mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
33968e6c7d
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
36 lines
869 B
Go
36 lines
869 B
Go
package main
|
|
|
|
import (
|
|
"strings"
|
|
|
|
"github.com/docker/docker/integration-cli/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`)
|
|
}
|