Skip to content

Commit

Permalink
fix UT
Browse files Browse the repository at this point in the history
Signed-off-by: Billy Zha <[email protected]>
  • Loading branch information
qweeah committed Nov 2, 2023
1 parent 87f4710 commit 4ec05c2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cmd/oras/internal/option/common_unix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ func TestCommon_parseTTY(t *testing.T) {

// --debug
opts.Debug = true
if err := opts.parseTTY(device); err == nil {
t.Error("expected error when debug is set with TTY output")
if err := opts.parseTTY(device); err != nil {
t.Errorf("unexpected error with --debug: %v", err)
}
if !opts.noTTY {
t.Errorf("expected --no-tty to be true with --debug")
}
}

0 comments on commit 4ec05c2

Please sign in to comment.