(t *testing.T)
| 57 | } |
| 58 | |
| 59 | func TestSystemdCgroupCpuController(t *testing.T) { |
| 60 | checkCgroupMode(t) |
| 61 | group := fmt.Sprintf("testing-cpu-%d.scope", os.Getpid()) |
| 62 | var weight uint64 = 100 |
| 63 | c, err := NewSystemd("", group, os.Getpid(), &Resources{CPU: &CPU{Weight: &weight}}) |
| 64 | require.NoError(t, err, "failed to init new cgroup systemd manager") |
| 65 | |
| 66 | checkFileContent(t, c.path, "cpu.weight", strconv.FormatUint(weight, 10)) |
| 67 | } |
| 68 | |
| 69 | func TestSystemdCgroupCpuController_NilWeight(t *testing.T) { |
| 70 | checkCgroupMode(t) |
nothing calls this directly
no test coverage detected
searching dependent graphs…