Skip to content

Commit

Permalink
fix: test
Browse files Browse the repository at this point in the history
  • Loading branch information
skynet2 committed Dec 21, 2024
1 parent 91a3de4 commit e53a283
Showing 1 changed file with 11 additions and 19 deletions.
30 changes: 11 additions & 19 deletions pkg/restapi/v1/issuer/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -891,16 +891,20 @@ func TestController_initiateCredentialIssuance_CompatibilityV1(t *testing.T) {

now := lo.ToPtr(time.Now().UTC())
req, err := json.Marshal(&InitiateOIDC4CIRequest{
ClaimData: lo.ToPtr(map[string]interface{}{
"key": "value",
CredentialConfiguration: lo.ToPtr([]InitiateIssuanceCredentialConfiguration{
{
ClaimData: lo.ToPtr(map[string]interface{}{
"key": "value",
}),
ClaimEndpoint: lo.ToPtr("https://vcs.pb.example.com/claim"),
CredentialDescription: lo.ToPtr("description1"),
CredentialExpiresAt: now,
CredentialName: lo.ToPtr("name1"),
CredentialTemplateId: lo.ToPtr("templateID"),
},
}),
ClaimEndpoint: lo.ToPtr("https://vcs.pb.example.com/claim"),
ClientInitiateIssuanceUrl: lo.ToPtr("https://wallet.example.com/initiate_issuance"),
ClientWellknown: lo.ToPtr("https://wallet.example.com/.well-known/openid-configuration"),
CredentialDescription: lo.ToPtr("description1"),
CredentialExpiresAt: now,
CredentialName: lo.ToPtr("name1"),
CredentialTemplateId: lo.ToPtr("templateID"),
GrantType: lo.ToPtr(InitiateOIDC4CIRequestGrantTypeAuthorizationCode),
OpState: lo.ToPtr("eyJhbGciOiJSU0Et"),
ResponseType: lo.ToPtr("token"),
Expand Down Expand Up @@ -1059,7 +1063,6 @@ func TestController_InitiateCredentialIssuance(t *testing.T) {

now := lo.ToPtr(time.Now().UTC())
req, err := json.Marshal(&InitiateOIDC4CIRequest{
ClaimEndpoint: lo.ToPtr("https://vcs.pb.example.com/claim"),
ClientInitiateIssuanceUrl: lo.ToPtr("https://wallet.example.com/initiate_issuance"),
ClientWellknown: lo.ToPtr("https://wallet.example.com/.well-known/openid-configuration"),
CredentialConfiguration: lo.ToPtr([]InitiateIssuanceCredentialConfiguration{
Expand All @@ -1082,14 +1085,8 @@ func TestController_InitiateCredentialIssuance(t *testing.T) {
CredentialExpiresAt: now,
CredentialName: lo.ToPtr("name2"),
CredentialTemplateId: lo.ToPtr("templateID1"),
Compose: &DeprecatedComposeOIDC4CICredential{
Credential: nil,
IdTemplate: lo.ToPtr("something"),
OverrideIssuer: lo.ToPtr(true),
},
},
}),
CredentialExpiresAt: now,
GrantType: lo.ToPtr(InitiateOIDC4CIRequestGrantTypeAuthorizationCode),
OpState: lo.ToPtr("eyJhbGciOiJSU0Et"),
ResponseType: lo.ToPtr("token"),
Expand Down Expand Up @@ -1142,11 +1139,6 @@ func TestController_InitiateCredentialIssuance(t *testing.T) {
CredentialExpiresAt: now,
CredentialName: "name2",
CredentialDescription: "description2",
ComposeCredential: &oidc4ci.InitiateIssuanceComposeCredential{
Credential: nil,
IDTemplate: "something",
OverrideIssuer: true,
},
},
},
}
Expand Down

0 comments on commit e53a283

Please sign in to comment.