moby/integration-cli/docker_cli_experimental_test.go
Kenfe-Mickael Laventure 7781a1bf0f Make experimental a runtime flag
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-10-24 15:20:01 -07:00

36 lines
869 B
Go

package main
import (
"strings"
"github.com/docker/docker/pkg/integration/checker"
"github.com/go-check/check"
)
func (s *DockerSuite) TestExperimentalVersionTrue(c *check.C) {
testRequires(c, ExperimentalDaemon)
out, _ := dockerCmd(c, "version")
for _, line := range strings.Split(out, "\n") {
if strings.HasPrefix(strings.TrimSpace(line), "Experimental:") {
c.Assert(line, checker.Matches, "*true")
return
}
}
c.Fatal(`"Experimental" not found in version output`)
}
func (s *DockerSuite) TestExperimentalVersionFalse(c *check.C) {
testRequires(c, NotExperimentalDaemon)
out, _ := dockerCmd(c, "version")
for _, line := range strings.Split(out, "\n") {
if strings.HasPrefix(strings.TrimSpace(line), "Experimental:") {
c.Assert(line, checker.Matches, "*false")
return
}
}
c.Fatal(`"Experimental" not found in version output`)
}