Skip to content

Commit

Permalink
fixed E2E tests
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Zheng <[email protected]>
  • Loading branch information
Two-Hearts committed Aug 15, 2024
1 parent e1df4b7 commit c609608
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions test/e2e/suite/trustpolicy/multi_statements.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ var _ = Describe("notation trust policy multi-statements test", func() {
// test localhost:5000/test-repo
notation.Exec("sign", artifact.ReferenceWithDigest()).MatchKeyWords(SignSuccessfully)
notation.ExpectFailure().Exec("verify", artifact.ReferenceWithDigest()).
MatchErrContent("Error: registry scope \"localhost:5000/test-repo8\" is present in multiple oci trust policy statements, one registry scope value can only be associated with one statement\n")
MatchErrContent("Error: registry scope \"localhost:5000/test-repo8\" is present in multiple trust policy statements, one registry scope value can only be associated with one statement\n")
})
})

Expand All @@ -56,7 +56,7 @@ var _ = Describe("notation trust policy multi-statements test", func() {
// test localhost:5000/test-repo
notation.Exec("sign", artifact.ReferenceWithDigest()).MatchKeyWords(SignSuccessfully)
notation.ExpectFailure().Exec("verify", artifact.ReferenceWithDigest()).
MatchErrContent("Error: multiple oci trust policy statements use the same name \"e2e\", statement names must be unique\n")
MatchErrContent("Error: multiple trust policy statements use the same name \"e2e\", statement names must be unique\n")
})
})

Expand All @@ -68,7 +68,7 @@ var _ = Describe("notation trust policy multi-statements test", func() {
// test localhost:5000/test-repo
notation.Exec("sign", artifact.ReferenceWithDigest()).MatchKeyWords(SignSuccessfully)
notation.ExpectFailure().Exec("verify", artifact.ReferenceWithDigest()).
MatchErrContent("Error: registry scope \"*\" is present in multiple oci trust policy statements, one registry scope value can only be associated with one statement\n")
MatchErrContent("Error: registry scope \"*\" is present in multiple trust policy statements, one registry scope value can only be associated with one statement\n")
})
})
})
4 changes: 2 additions & 2 deletions test/e2e/suite/trustpolicy/registry_scope.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ var _ = Describe("notation trust policy registryScope test", func() {
// test localhost:5000/test-repo
OldNotation().Exec("sign", artifact.ReferenceWithDigest()).MatchKeyWords(SignSuccessfully)
notation.ExpectFailure().Exec("verify", artifact.ReferenceWithDigest()).
MatchErrKeyWords("registry scope \"localhost:5000/test-repo6\" is present in multiple oci trust policy statements")
MatchErrKeyWords("registry scope \"localhost:5000/test-repo6\" is present in multiple trust policy statements")
})
})

Expand All @@ -137,7 +137,7 @@ var _ = Describe("notation trust policy registryScope test", func() {
// test localhost:5000/test-repo
OldNotation().Exec("sign", artifact.ReferenceWithDigest()).MatchKeyWords(SignSuccessfully)
notation.ExpectFailure().Exec("verify", artifact.ReferenceWithDigest()).
MatchErrContent(fmt.Sprintf("Error: signature verification failed: artifact %q has no applicable oci trust policy statement. Trust policy applicability for a given artifact is determined by registryScopes. To create a trust policy, see: %s\n", artifact.ReferenceWithDigest(), trustPolicyLink))
MatchErrContent(fmt.Sprintf("Error: signature verification failed: artifact %q has no applicable trust policy statement. Trust policy applicability for a given artifact is determined by registryScopes. To create a trust policy, see: %s\n", artifact.ReferenceWithDigest(), trustPolicyLink))
})
})
})

0 comments on commit c609608

Please sign in to comment.