github.com/justincormack/cli@v0.0.0-20201215022714-831ebeae9675/cli/command/stack/deploy_test.go (about) 1 package stack 2 3 import ( 4 "io/ioutil" 5 "testing" 6 7 "github.com/docker/cli/internal/test" 8 "gotest.tools/v3/assert" 9 ) 10 11 func TestDeployWithEmptyName(t *testing.T) { 12 cmd := newDeployCommand(test.NewFakeCli(&fakeClient{}), nil) 13 cmd.SetArgs([]string{"' '"}) 14 cmd.SetOut(ioutil.Discard) 15 16 assert.ErrorContains(t, cmd.Execute(), `invalid stack name: "' '"`) 17 }