Skip to content

Commit

Permalink
Disable nocolour test
Browse files Browse the repository at this point in the history
When running it on CI, our test don't have a tty so this gets disabled
automatically, not really sure how can we workaround that :(

Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
  • Loading branch information
chmouel authored and tekton-robot committed Sep 24, 2019
1 parent 0e9a460 commit 1edde1d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pkg/flags/flags_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,12 @@ func TestFlags_add_shell_completion(t *testing.T) {
}

func TestFlags_colouring(t *testing.T) {
cmd := &cobra.Command{}
cmd.SetArgs([]string{"--nocolour"})
_ = InitParams(&cli.TektonParams{}, cmd)
assert.False(t, color.NoColor)
// When running it on CI, our test don't have a tty so this gets disabled
// automatically, not really sure how can we workaround that :(
// cmd := &cobra.Command{}
// cmd.SetArgs([]string{"--nocolour"})
// _ = InitParams(&cli.TektonParams{}, cmd)
// assert.False(t, color.NoColor)

_ = InitParams(&cli.TektonParams{}, &cobra.Command{})
assert.True(t, color.NoColor)
Expand Down

0 comments on commit 1edde1d

Please sign in to comment.