Skip to content
This repository has been archived by the owner on Feb 24, 2023. It is now read-only.

Commit

Permalink
Fix test to work where cgroup is cpu,cpuacct
Browse files Browse the repository at this point in the history
  • Loading branch information
ibuildthecloud committed Jan 22, 2015
1 parent aa529de commit 74b59c9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,13 +240,13 @@ func TestParseCgroups(t *testing.T) {
log.Fatal("Error:", err)
}

if val, ok := cgroups["cpu"]; ok {
p := path.Join(SYSFS, "cpu", val)
if val, ok := cgroups["blkio"]; ok {
p := path.Join(SYSFS, "blkio", val)
if _, err := os.Stat(p); os.IsNotExist(err) {
log.Fatalf("Path does not exist %s", p, err)
}
} else {
log.Fatal("Failed to find cpu cgroup", val)
log.Fatal("Failed to find blkio cgroup", val)
}
}

Expand Down

0 comments on commit 74b59c9

Please sign in to comment.