Bladeren bron

Ignore blank lines in getCgroupPaths

w/o this I would see:
```
  unexpected file format for /proc/self/cgroup - ""
```
while running the cgroup tests

Signed-off-by: Doug Davis <dug@us.ibm.com>
Doug Davis 10 jaren geleden
bovenliggende
commit
301bd57b1d
1 gewijzigde bestanden met toevoegingen van 4 en 0 verwijderingen
  1. 4 0
      integration-cli/docker_cli_run_unix_test.go

+ 4 - 0
integration-cli/docker_cli_run_unix_test.go

@@ -112,6 +112,10 @@ func TestRunWithUlimits(t *testing.T) {
 func getCgroupPaths(test string) map[string]string {
 	cgroupPaths := map[string]string{}
 	for _, line := range strings.Split(test, "\n") {
+		line = strings.TrimSpace(line)
+		if line == "" {
+			continue
+		}
 		parts := strings.Split(line, ":")
 		if len(parts) != 3 {
 			fmt.Printf("unexpected file format for /proc/self/cgroup - %q\n", line)