From ddf0f6253661810bc7adf90215aff33c7e7c7f6d Mon Sep 17 00:00:00 2001 From: Tanner Stirrat Date: Thu, 19 Sep 2024 15:49:16 -0600 Subject: [PATCH] Remove test that's hard to isolate --- internal/client/client_test.go | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/internal/client/client_test.go b/internal/client/client_test.go index 4ca6737..5538b42 100644 --- a/internal/client/client_test.go +++ b/internal/client/client_test.go @@ -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) -}