From 79d3c9594dfee79f380da43811517cf692cf0faf Mon Sep 17 00:00:00 2001 From: Meredith Lancaster Date: Tue, 19 Mar 2024 16:41:13 -0600 Subject: [PATCH] use strings.Split func Signed-off-by: Meredith Lancaster --- pkg/cmd/attestation/inspect/inspect_test.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pkg/cmd/attestation/inspect/inspect_test.go b/pkg/cmd/attestation/inspect/inspect_test.go index 99b38876c..828a12139 100644 --- a/pkg/cmd/attestation/inspect/inspect_test.go +++ b/pkg/cmd/attestation/inspect/inspect_test.go @@ -4,6 +4,7 @@ import ( "bytes" "fmt" "net/http" + "strings" "testing" "github.com/cli/cli/v2/pkg/cmd/attestation/artifact/oci" @@ -13,7 +14,6 @@ import ( "github.com/cli/cli/v2/pkg/httpmock" "github.com/cli/cli/v2/pkg/iostreams" - "github.com/google/shlex" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -112,13 +112,12 @@ func TestNewInspectCmd(t *testing.T) { return nil }) - argv, err := shlex.Split(tc.cli) - assert.NoError(t, err) + argv := strings.Split(tc.cli, " ") cmd.SetArgs(argv) cmd.SetIn(&bytes.Buffer{}) cmd.SetOut(&bytes.Buffer{}) cmd.SetErr(&bytes.Buffer{}) - _, err = cmd.ExecuteC() + _, err := cmd.ExecuteC() if tc.wantsErr { assert.Error(t, err) return