Skip to content

Commit

Permalink
fixed e2e
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 700657a commit 592b0a1
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 @@ -101,14 +101,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, filepath.Join(GinkgoT().TempDir(), tmpConfigName)).
ORAS("login", ZOTHost, "-u", Username, "--identity-token", Password).
MatchKeyWords("--username cannot be used with --identity-token or --identity-token-stdin").
ExpectFailure().
Exec()
})

It("should fail if password is used with identity token", func() {
ORAS("login", ZOTHost, "-p", Password, "--identity-token", Password, filepath.Join(GinkgoT().TempDir(), tmpConfigName)).
ORAS("login", ZOTHost, "-p", Password, "--identity-token", Password).
MatchKeyWords("--password and --password-stdin cannot be used with --identity-token or --identity-token-stdin").
ExpectFailure().
Exec()
Expand Down Expand Up @@ -169,7 +169,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, filepath.Join(GinkgoT().TempDir(), tmpConfigName)).
ORAS("login", ZOTHost, "--identity-token", Password).
MatchErrKeyWords("WARNING", "Using --password via the CLI is insecure", "Use --password-stdin").ExpectFailure().Exec()
})
})
Expand Down

0 comments on commit 592b0a1

Please sign in to comment.