From 9dbe12b792a46538c01862930c85ace18dbe14f3 Mon Sep 17 00:00:00 2001 From: Nathan LeClaire Date: Sat, 25 Apr 2015 16:42:30 -0400 Subject: [PATCH] Migrate integration test to new method Signed-off-by: Nathan LeClaire --- integration-cli/docker_cli_build_test.go | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/integration-cli/docker_cli_build_test.go b/integration-cli/docker_cli_build_test.go index 93affbc5f9..dd8635f953 100644 --- a/integration-cli/docker_cli_build_test.go +++ b/integration-cli/docker_cli_build_test.go @@ -5252,20 +5252,20 @@ func (s *DockerSuite) TestBuildEmptyStringVolume(c *check.C) { } -func TestBuildContainerWithCgroupParent(t *testing.T) { - testRequires(t, NativeExecDriver) - testRequires(t, SameHostDaemon) +func (s *DockerSuite) TestBuildContainerWithCgroupParent(c *check.C) { + testRequires(c, NativeExecDriver) + testRequires(c, SameHostDaemon) defer deleteImages() cgroupParent := "test" data, err := ioutil.ReadFile("/proc/self/cgroup") if err != nil { - t.Fatalf("failed to read '/proc/self/cgroup - %v", err) + c.Fatalf("failed to read '/proc/self/cgroup - %v", err) } selfCgroupPaths := parseCgroupPaths(string(data)) _, found := selfCgroupPaths["memory"] if !found { - t.Fatalf("unable to find self cpu cgroup path. CgroupsPath: %v", selfCgroupPaths) + c.Fatalf("unable to find self cpu cgroup path. CgroupsPath: %v", selfCgroupPaths) } cmd := exec.Command(dockerBinary, "build", "--cgroup-parent", cgroupParent, "-") cmd.Stdin = strings.NewReader(` @@ -5275,7 +5275,6 @@ RUN cat /proc/self/cgroup out, _, err := runCommandWithOutput(cmd) if err != nil { - t.Fatalf("unexpected failure when running container with --cgroup-parent option - %s\n%v", string(out), err) + c.Fatalf("unexpected failure when running container with --cgroup-parent option - %s\n%v", string(out), err) } - logDone("build - cgroup parent") }