MCPcopy Index your code
hub / github.com/coder/envbox / FakeCPUGroups

Function FakeCPUGroups

cli/clitest/fs.go:18–24  ·  view source on GitHub ↗
(t *testing.T, fs afero.Fs, quota, period string)

Source from the content-addressed store, hash-verified

16}
17
18func FakeCPUGroups(t *testing.T, fs afero.Fs, quota, period string) {
19 err := afero.WriteFile(fs, xunix.CPUPeriodPathCGroupV1, []byte(period), 0o600)
20 require.NoError(t, err)
21
22 err = afero.WriteFile(fs, xunix.CPUQuotaPathCGroupV1, []byte(quota), 0o600)
23 require.NoError(t, err)
24}

Callers 1

NewFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected