github.com/cspotcode/docker-cli@v20.10.0-rc1.0.20201201121459-3faad7acc5b8+incompatible/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  }