From f3092a3590652fc3f1f882fdd306a043a72b614e Mon Sep 17 00:00:00 2001 From: Roger Coll Date: Thu, 12 Dec 2024 15:21:09 +0100 Subject: [PATCH] fix: integration test linter --- extension/cgroupruntimeextension/integration_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/extension/cgroupruntimeextension/integration_test.go b/extension/cgroupruntimeextension/integration_test.go index bcf96f198116..fead3fec715c 100644 --- a/extension/cgroupruntimeextension/integration_test.go +++ b/extension/cgroupruntimeextension/integration_test.go @@ -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 { @@ -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) } } @@ -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) } }