Skip to content

Commit

Permalink
fixed failure
Browse files Browse the repository at this point in the history
Signed-off-by: Xiaoxuan Wang <[email protected]>
  • Loading branch information
wangxiaoxuan273 committed Mar 19, 2024
1 parent 592b0a1 commit a8a4e09
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/e2e/suite/auth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,14 @@ var _ = Describe("Common registry user", func() {

It("should fail if username is used with identity token", func() {
ORAS("login", ZOTHost, "-u", Username, "--identity-token", Password).
MatchKeyWords("--username cannot be used with --identity-token or --identity-token-stdin").
MatchKeyWords("Error", "--username", "cannot be used with", "--identity-token").
ExpectFailure().
Exec()
})

It("should fail if password is used with identity token", func() {
ORAS("login", ZOTHost, "-p", Password, "--identity-token", Password).
MatchKeyWords("--password and --password-stdin cannot be used with --identity-token or --identity-token-stdin").
MatchKeyWords("Error", "--password", "cannot be used with", "--identity-token").
ExpectFailure().
Exec()
})
Expand Down Expand Up @@ -170,7 +170,7 @@ var _ = Describe("Common registry user", func() {

It("should fail as the test server doesn't support token service", func() {
ORAS("login", ZOTHost, "--identity-token", Password).
MatchErrKeyWords("WARNING", "Using --password via the CLI is insecure", "Use --password-stdin").ExpectFailure().Exec()
MatchErrKeyWords("WARNING", "Using --identity-token via the CLI is insecure", "Use --identity-token-stdin").ExpectFailure().Exec()
})
})

Expand Down

0 comments on commit a8a4e09

Please sign in to comment.