Move some test fixtures to go

moves ensure-frozen-images to go
moves ensure-syscall-test to go
moves ensure-nnp-test to go
moves ensure-httpserver to go

Also makes some of the fixtures load only for the required tests.
This makes sure that fixtures that won't be needed for a test run such as
`make TESTFLAGS='-check.f Swarm' test-integration-cli` (for example)
aren't loaded... like the syscall tests.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: ff91276d1f5beab5582d9ca582ee01af13198333
Component: engine
This commit is contained in:
Brian Goff
2016-08-31 15:31:06 -04:00
parent 6aa1b8a3eb
commit cecd3ec1b9
16 changed files with 430 additions and 174 deletions

View File

@ -308,8 +308,13 @@ RUN echo 2 #layer2
}
func (*DockerSuite) TestRmiParentImageFail(c *check.C) {
parent := inspectField(c, "busybox", "Parent")
out, _, err := dockerCmdWithError("rmi", parent)
_, err := buildImage("test", `
FROM busybox
RUN echo hello`, false)
c.Assert(err, checker.IsNil)
id := inspectField(c, "busybox", "ID")
out, _, err := dockerCmdWithError("rmi", id)
c.Assert(err, check.NotNil)
if !strings.Contains(out, "image has dependent child images") {
c.Fatalf("rmi should have failed because it's a parent image, got %s", out)