Skip to content

Commit

Permalink
fix: integration test linter
Browse files Browse the repository at this point in the history
  • Loading branch information
rogercoll committed Dec 12, 2024
1 parent 65656bb commit f3092a3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions extension/cgroupruntimeextension/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ func cgroupMaxCpu(filename string) (quota int64, period uint64, err error) {

func TestCgroupV2SudoIntegration(t *testing.T) {
checkCgroupSystem(t)
pointerInt64 := func(int int64) *int64 {
return &int
pointerInt64 := func(val int64) *int64 {
return &val
}
pointerUint64 := func(int uint64) *uint64 {
return &int
pointerUint64 := func(uval uint64) *uint64 {
return &uval
}

tests := []struct {
Expand Down Expand Up @@ -168,7 +168,7 @@ func TestCgroupV2SudoIntegration(t *testing.T) {
if initialMaxMemory == math.MaxUint64 {
// fallback solution to set cgroup's max memory to "max"
memoryCgroupCleanUp = func() {
err = os.WriteFile(path.Join(defaultCgroup2Path, cgroupPath, "memory.max"), []byte("max"), 0o644)
err = os.WriteFile(path.Join(defaultCgroup2Path, cgroupPath, "memory.max"), []byte("max"), 0o600)
assert.NoError(t, err)
}
}
Expand All @@ -188,7 +188,7 @@ func TestCgroupV2SudoIntegration(t *testing.T) {
if initialCpuQuota == math.MaxInt64 {
// fallback solution to set cgroup's max cpu to "max"
cpuCgroupCleanUp = func() {
err = os.WriteFile(path.Join(defaultCgroup2Path, cgroupPath, "cpu.max"), []byte("max"), 0o644)
err = os.WriteFile(path.Join(defaultCgroup2Path, cgroupPath, "cpu.max"), []byte("max"), 0o600)
assert.NoError(t, err)
}
}
Expand Down

0 comments on commit f3092a3

Please sign in to comment.