File: cgroups_test.go

package info (click to toggle)
runc 1.0.3%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 2,836 kB
  • sloc: sh: 1,571; ansic: 1,236; makefile: 136
file content (20 lines) | stat: -rw-r--r-- 277 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// +build ignore

package cgroups

import (
	"testing"
)

func TestParseCgroups(t *testing.T) {
	cgroups, err := ParseCgroupFile("/proc/self/cgroup")
	if err != nil {
		t.Fatal(err)
	}
	if IsCgroup2UnifiedMode() {
		return
	}
	if _, ok := cgroups["cpu"]; !ok {
		t.Fail()
	}
}