Files
docker-machine/its/cli/driver_help_test.go
David Gageot 5d95524be6 Write CLI integration tests with Go
Signed-off-by: David Gageot <david@gageot.net>
2016-01-25 16:23:53 +01:00

27 lines
581 B
Go

package cli
import (
"testing"
"github.com/docker/machine/its"
)
func TestDriverHelp(t *testing.T) {
test := its.NewTest(t)
defer test.TearDown()
test.SkipDriver("ci-test")
test.Run("no --help flag or command specified", func() {
test.Machine("create -d $DRIVER").Should().Fail("Error: No machine name specified")
})
test.Run("-h flag specified", func() {
test.Machine("create -d $DRIVER -h").Should().Succeed(test.DriverName())
})
test.Run("--help flag specified", func() {
test.Machine("create -d $DRIVER --help").Should().Succeed(test.DriverName())
})
}