Skip to content

Commit

Permalink
Remove test that's hard to isolate
Browse files Browse the repository at this point in the history
  • Loading branch information
tstirrat15 committed Sep 19, 2024
1 parent 5b857c3 commit ddf0f62
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions internal/client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,19 +118,3 @@ func TestGetCurrentTokenWithCLIOverrideWithoutSecretFile(t *testing.T) {
require.Equal("e1", token.Endpoint)
require.Equal(&bTrue, token.Insecure)
}

func TestGetCurrentTokenWithCLIOverrideWithInsufficientArgs (t *testing.T) {
// This is to ensure that insufficient args don't unintentionally validate.
require := require.New(t)
cmd := zedtesting.CreateTestCobraCommandWithFlagValue(t,
zedtesting.StringFlag{FlagName: "token", FlagValue: "", Changed: false},
zedtesting.StringFlag{FlagName: "endpoint", FlagValue: "e1", Changed: true},
zedtesting.StringFlag{FlagName: "certificate-path", FlagValue: "", Changed: false},
)

configStore, secretStore := client.DefaultStorage()
_, err := client.GetCurrentTokenWithCLIOverride(cmd, configStore, secretStore)

// cli args take precedence when defined
require.NoError(err)
}

0 comments on commit ddf0f62

Please sign in to comment.