From 592b0a16246797fecfb60d596a718847ff3b06ba Mon Sep 17 00:00:00 2001 From: Xiaoxuan Wang Date: Tue, 19 Mar 2024 07:28:51 +0000 Subject: [PATCH] fixed e2e Signed-off-by: Xiaoxuan Wang --- test/e2e/suite/auth/auth.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/e2e/suite/auth/auth.go b/test/e2e/suite/auth/auth.go index 0ddc3257e..28d9097f8 100644 --- a/test/e2e/suite/auth/auth.go +++ b/test/e2e/suite/auth/auth.go @@ -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() @@ -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() }) })