use strings.Split func
Signed-off-by: Meredith Lancaster <malancas@github.com>
This commit is contained in:
parent
023b2af7d0
commit
79d3c9594d
1 changed files with 3 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue