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

Function TestReadUint

cgroup1/utils_test.go:36–51  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

34}
35
36func TestReadUint(t *testing.T) {
37 tDir := t.TempDir()
38 pidsmax := filepath.Join(tDir, "pids.max")
39 err := os.WriteFile(pidsmax, []byte("max"), 0644)
40 if err != nil {
41 t.Fatal(err)
42 }
43 max, err := readUint(pidsmax)
44 if err != nil {
45 t.Fatal(err)
46 }
47 // test for backwards compatibility
48 if max != 0 {
49 t.Fail()
50 }
51}

Callers

nothing calls this directly

Calls 1

readUintFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…