Skip to content

Commit

Permalink
test: fix e2e test 6
Browse files Browse the repository at this point in the history
  • Loading branch information
junczhu committed Aug 25, 2024
1 parent 11de2c0 commit fee6b7d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion pkg/verifier/notation/notation.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,9 @@ func normalizeVerificationCertsStores(conf *NotationPluginVerifierConfig) error
return re.ErrorCodeConfigInvalid.NewError(re.Verifier, conf.Name, re.EmptyLink, err, nil, re.HideStackTrace)
}
var legacyCertStore map[string]interface{}
json.Unmarshal(legacyCertStoreBytes, &legacyCertStore)
if err := json.Unmarshal(legacyCertStoreBytes, &legacyCertStore); err != nil {
return re.ErrorCodeConfigInvalid.NewError(re.Verifier, conf.Name, re.EmptyLink, err, fmt.Sprintf("failed to unmarshal to legacyCertStore from: %+v.", legacyCertStoreBytes), re.HideStackTrace)
}
// support legacy verfier config format for backward compatibility
conf.VerificationCertStores = verificationCertStores{
trustStoreTypeCA: legacyCertStore,
Expand Down
2 changes: 1 addition & 1 deletion pkg/verifier/notation/notation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ func TestParseVerifierConfig(t *testing.T) {
Name: test,
VerificationCerts: []string{testPath, defaultCertDir},
VerificationCertStores: verificationCertStores{
trustStoreTypeCA: verificationCertStores{
trustStoreTypeCA: map[string]interface{}{
"certstore1": []interface{}{"akv1", "akv2"},
"certstore2": []interface{}{"akv3", "akv4"},
},
Expand Down

0 comments on commit fee6b7d

Please sign in to comment.