aboutsummaryrefslogtreecommitdiff
path: root/tests/root_test
diff options
context:
space:
mode:
authorJakob Unterwurzacher2025-07-07 19:54:48 +0200
committerJakob Unterwurzacher2025-07-07 19:59:35 +0200
commit8f5df19b353e02ffba842fd1b15ccf93da7ee3b4 (patch)
tree8f68b74e56a1d20af82e5093a059d180c925f9be /tests/root_test
parentcdb80ea9825d2e876f1cf579bf960e4da7656b4c (diff)
Fix a bunch of staticcheck errors
Tool-assisted.
Diffstat (limited to 'tests/root_test')
-rw-r--r--tests/root_test/issue893_test.go5
-rw-r--r--tests/root_test/root_test.go7
2 files changed, 5 insertions, 7 deletions
diff --git a/tests/root_test/issue893_test.go b/tests/root_test/issue893_test.go
index 6ad8e6d..2db0b19 100644
--- a/tests/root_test/issue893_test.go
+++ b/tests/root_test/issue893_test.go
@@ -4,7 +4,6 @@ package root_test
import (
"fmt"
- "io/ioutil"
"os"
"sync"
"syscall"
@@ -35,10 +34,10 @@ func TestConcurrentUserOps(t *testing.T) {
if err = os.MkdirAll(d, 0700); err != nil {
return
}
- if err = ioutil.WriteFile(d+"/foo", nil, 0400); err != nil {
+ if err = os.WriteFile(d+"/foo", nil, 0400); err != nil {
return
}
- if err = ioutil.WriteFile(d+"/bar", []byte("aaaaaaaaaaaaaaaaaaaaa"), 0400); err != nil {
+ if err = os.WriteFile(d+"/bar", []byte("aaaaaaaaaaaaaaaaaaaaa"), 0400); err != nil {
return
}
if err = syscall.Unlink(d + "/foo"); err != nil {
diff --git a/tests/root_test/root_test.go b/tests/root_test/root_test.go
index 9ce1f4b..7bc3ebc 100644
--- a/tests/root_test/root_test.go
+++ b/tests/root_test/root_test.go
@@ -5,7 +5,6 @@
package root_test
import (
- "io/ioutil"
"os"
"os/exec"
"path/filepath"
@@ -203,7 +202,7 @@ func TestDiskFull(t *testing.T) {
}
t.Logf("sz1=%d, sz2=%d", sz1, sz2)
- foo1, err := ioutil.ReadFile(mnt + "/foo1")
+ foo1, err := os.ReadFile(mnt + "/foo1")
if err != nil {
t.Fatal(err)
}
@@ -211,7 +210,7 @@ func TestDiskFull(t *testing.T) {
t.Fail()
}
- foo2, err := ioutil.ReadFile(mnt + "/foo2")
+ foo2, err := os.ReadFile(mnt + "/foo2")
if err != nil {
t.Fatal(err)
}
@@ -231,7 +230,7 @@ func TestAcl(t *testing.T) {
defer test_helpers.UnmountPanic(pDir)
f1 := pDir + "/f1"
- if err := ioutil.WriteFile(f1, []byte("hello world\n"), 000); err != nil {
+ if err := os.WriteFile(f1, []byte("hello world\n"), 000); err != nil {
t.Fatal(err)
}