Skip to content

Commit

Permalink
e2e
Browse files Browse the repository at this point in the history
Signed-off-by: Xiaoxuan Wang <wangxiaoxuan119@gmail.com>
  • Loading branch information
wangxiaoxuan273 committed Apr 18, 2024
1 parent c91ec41 commit 56595cf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/e2e/internal/utils/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ const (
orasBinary = "oras"

// customize your own basic auth file via `htpasswd -cBb <file_name> <user_name> <password>`
Username = "hello"
Password = "oras-test"
DefaultTimeout = 10 * time.Second
Username = "hello"
Password = "oras-test"
DefaultTimeout = 10 * time.Second
// If the command hasn't exited yet, ginkgo session ExitCode is -1
notResponding = -1
)
Expand Down
5 changes: 5 additions & 0 deletions test/e2e/suite/auth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,11 @@ var _ = Describe("Common registry user", func() {
ORAS("login", ZOTHost, "--identity-token", Password).
MatchErrKeyWords("WARNING", "Using --identity-token via the CLI is insecure", "Use --identity-token-stdin").ExpectFailure().Exec()
})

It("should fail if --cert-file is not used with --key-file with correct error message", func() {
ORAS("login", ZOTHost, "--cert-file", "test").
MatchErrKeyWords("--key-file", "required", "not provided").ExpectFailure().Exec()
})
})

When("using legacy config", func() {
Expand Down

0 comments on commit 56595cf

Please sign in to comment.