Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
| ... | ... |
@@ -16,14 +16,14 @@ func TestReadProcBool(t *testing.T) {
|
| 16 | 16 |
defer os.RemoveAll(tmpDir) |
| 17 | 17 |
|
| 18 | 18 |
procFile := filepath.Join(tmpDir, "read-proc-bool") |
| 19 |
- err = os.WriteFile(procFile, []byte("1"), 0644)
|
|
| 19 |
+ err = os.WriteFile(procFile, []byte("1"), 0o644)
|
|
| 20 | 20 |
assert.NilError(t, err) |
| 21 | 21 |
|
| 22 | 22 |
if !readProcBool(procFile) {
|
| 23 | 23 |
t.Fatal("expected proc bool to be true, got false")
|
| 24 | 24 |
} |
| 25 | 25 |
|
| 26 |
- if err := os.WriteFile(procFile, []byte("0"), 0644); err != nil {
|
|
| 26 |
+ if err := os.WriteFile(procFile, []byte("0"), 0o644); err != nil {
|
|
| 27 | 27 |
t.Fatal(err) |
| 28 | 28 |
} |
| 29 | 29 |
if readProcBool(procFile) {
|
| ... | ... |
@@ -44,7 +44,7 @@ func TestCgroupEnabled(t *testing.T) {
|
| 44 | 44 |
t.Fatal("cgroupEnabled should be false")
|
| 45 | 45 |
} |
| 46 | 46 |
|
| 47 |
- err = os.WriteFile(path.Join(cgroupDir, "test"), []byte{}, 0644)
|
|
| 47 |
+ err = os.WriteFile(path.Join(cgroupDir, "test"), []byte{}, 0o644)
|
|
| 48 | 48 |
assert.NilError(t, err) |
| 49 | 49 |
|
| 50 | 50 |
if !cgroupEnabled(cgroupDir, "test") {
|