prepare for rm-gocheck script

Signed-off-by: Tibor Vass <tibor@docker.com>
This commit is contained in:
Tibor Vass
2019-08-09 06:57:11 +00:00
parent e07a3f2917
commit 931edfe5e9
10 changed files with 36 additions and 31 deletions

View File

@@ -108,7 +108,8 @@ func (s *DockerSuite) TestInspectTypeFlagWithImage(c *check.C) {
dockerCmd(c, "run", "--name=busybox", "-d", "busybox", "true")
out, _ := dockerCmd(c, "inspect", "--type=image", "busybox")
c.Assert(out, checker.Not(checker.Contains), "State") // not an image JSON
// not an image JSON
c.Assert(out, checker.Not(checker.Contains), "State")
}
func (s *DockerSuite) TestInspectTypeFlagWithInvalidValue(c *check.C) {
@@ -118,7 +119,7 @@ func (s *DockerSuite) TestInspectTypeFlagWithInvalidValue(c *check.C) {
dockerCmd(c, "run", "--name=busybox", "-d", "busybox", "true")
out, exitCode, err := dockerCmdWithError("inspect", "--type=foobar", "busybox")
c.Assert(err, checker.NotNil, check.Commentf("%s", exitCode))
c.Assert(err, checker.NotNil, check.Commentf("%d", exitCode))
c.Assert(exitCode, checker.Equals, 1, check.Commentf("%s", err))
c.Assert(out, checker.Contains, "not a valid value for --type")
}