MCPcopy Create free account
hub / github.com/containerd/cgroups / TestSystemdCgroupMemoryController

Function TestSystemdCgroupMemoryController

cgroup2/memoryv2_test.go:54–68  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

52}
53
54func TestSystemdCgroupMemoryController(t *testing.T) {
55 checkCgroupMode(t)
56 group := fmt.Sprintf("testing-memory-%d.scope", os.Getpid())
57 res := Resources{
58 Memory: &Memory{
59 Min: pointerInt64(16384),
60 Max: pointerInt64(629145600),
61 },
62 }
63 c, err := NewSystemd("", group, os.Getpid(), &res)
64 require.NoError(t, err, "failed to init new cgroup systemd manager")
65
66 checkFileContent(t, c.path, "memory.min", "16384")
67 checkFileContent(t, c.path, "memory.max", "629145600")
68}

Callers

nothing calls this directly

Calls 4

checkCgroupModeFunction · 0.85
pointerInt64Function · 0.85
checkFileContentFunction · 0.85
NewSystemdFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…