Browse code

Update --cgroup-parent cli integration test to use "memory" cgroup for detecting the test's cgroups path instead of CPU. Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)

Vishnu Kannan authored on 2015/03/20 07:45:01
Showing 1 changed files
... ...
@@ -114,7 +114,7 @@ func getCgroupPaths(test string) map[string]string {
114 114
 	for _, line := range strings.Split(test, "\n") {
115 115
 		parts := strings.Split(line, ":")
116 116
 		if len(parts) != 3 {
117
-			fmt.Printf("unexpected file format for /proc/self/cgroup - %q", line)
117
+			fmt.Printf("unexpected file format for /proc/self/cgroup - %q\n", line)
118 118
 			continue
119 119
 		}
120 120
 		cgroupPaths[parts[1]] = parts[2]
... ...
@@ -132,7 +132,7 @@ func TestRunContainerWithCgroupParent(t *testing.T) {
132 132
 		t.Fatalf("failed to read '/proc/self/cgroup - %v", err)
133 133
 	}
134 134
 	selfCgroupPaths := getCgroupPaths(string(data))
135
-	selfCpuCgroup, found := selfCgroupPaths["cpu"]
135
+	selfCpuCgroup, found := selfCgroupPaths["memory"]
136 136
 	if !found {
137 137
 		t.Fatalf("unable to find self cpu cgroup path. CgroupsPath: %v", selfCgroupPaths)
138 138
 	}