Files
docker-cli/cli/command/stack/swarm/remove_test.go
Vincent Demeester 2c4de4fb5e Update tests to use gotest.tools 👼
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2018-06-08 18:24:26 +02:00

19 lines
455 B
Go

package swarm
import (
"testing"
"github.com/docker/cli/cli/command/stack/options"
"github.com/docker/cli/internal/test"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
)
func TestRunRemoveWithEmptyName(t *testing.T) {
client := &fakeClient{}
dockerCli := test.NewFakeCli(client)
err := RunRemove(dockerCli, options.Remove{Namespaces: []string{"good", "' '", "alsogood"}})
assert.Check(t, is.Error(err, `invalid stack name: "' '"`))
}