Skip to content

Commit

Permalink
update func name
Browse files Browse the repository at this point in the history
  • Loading branch information
susanshi committed Oct 25, 2023
1 parent c7b0aa2 commit b2b62ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/verifier/notation/notation.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ func parseVerifierConfig(verifierConfig config.VerifierConfig, namespace string)
// append namespace to uniquely identify the certstore
if len(conf.VerificationCertStores) > 0 {
logger.GetLogger(context.Background(), logOpt).Debugf("VerificationCertStores is not empty, will append namespace %v to certificate store if resource does not already contain a namespace", namespace)
conf.VerificationCertStores, err = appendNamespaceToCertStore(conf.VerificationCertStores, namespace)
conf.VerificationCertStores, err = prependNamespaceToCertStore(conf.VerificationCertStores, namespace)
if err != nil {
return nil, err
}

Check warning on line 193 in pkg/verifier/notation/notation.go

View check run for this annotation

Codecov / codecov/patch

pkg/verifier/notation/notation.go#L192-L193

Added lines #L192 - L193 were not covered by tests
Expand All @@ -204,7 +204,7 @@ func (v *notationPluginVerifier) GetNestedReferences() []string {
}

// append namespace to certStore so they are uniquely identifiable
func appendNamespaceToCertStore(verificationCertStore map[string][]string, namespace string) (map[string][]string, error) {
func prependNamespaceToCertStore(verificationCertStore map[string][]string, namespace string) (map[string][]string, error) {
if namespace == "" {
return nil, re.ErrorCodeEnvNotSet.WithComponentType(re.Verifier).WithDetail("failure to parse VerificationCertStores, namespace for VerificationCertStores must be provided")
}

Check warning on line 210 in pkg/verifier/notation/notation.go

View check run for this annotation

Codecov / codecov/patch

pkg/verifier/notation/notation.go#L209-L210

Added lines #L209 - L210 were not covered by tests
Expand Down

0 comments on commit b2b62ce

Please sign in to comment.