aboutsummaryrefslogtreecommitdiff
path: root/tests/defaults/acl_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'tests/defaults/acl_test.go')
-rw-r--r--tests/defaults/acl_test.go11
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/defaults/acl_test.go b/tests/defaults/acl_test.go
index 2ab5dc1..0dae018 100644
--- a/tests/defaults/acl_test.go
+++ b/tests/defaults/acl_test.go
@@ -1,7 +1,6 @@
package defaults
import (
- "io/ioutil"
"math/rand"
"os"
"os/exec"
@@ -35,7 +34,7 @@ func TestCpA(t *testing.T) {
var modeWant os.FileMode = os.FileMode(rand.Int31n(0777+1) | 0400)
// Create file outside mount
- err := ioutil.WriteFile(fn1, nil, modeWant)
+ err := os.WriteFile(fn1, nil, modeWant)
if err != nil {
t.Fatal(err)
}
@@ -45,7 +44,7 @@ func TestCpA(t *testing.T) {
t.Fatal(err)
}
if fi.Mode() != modeWant {
- t.Errorf("ioutil.WriteFile created wrong permissions: want %o have %o", modeWant, fi.Mode())
+ t.Errorf("os.WriteFile created wrong permissions: want %o have %o", modeWant, fi.Mode())
}
// "cp -a" from outside to inside mount
@@ -93,7 +92,7 @@ func TestAcl543(t *testing.T) {
}
// Set acl on file outside gocryptfs mount
- err := ioutil.WriteFile(fn1, nil, modeWant)
+ err := os.WriteFile(fn1, nil, modeWant)
if err != nil {
t.Fatal(err)
}
@@ -117,7 +116,7 @@ func TestAcl543(t *testing.T) {
}
// Set acl on file inside gocryptfs mount
- err = ioutil.WriteFile(fn2, nil, modeWant)
+ err = os.WriteFile(fn2, nil, modeWant)
if err != nil {
t.Fatal(err)
}
@@ -164,7 +163,7 @@ func TestAcl543(t *testing.T) {
// Check that we handle zero-sized and undersized buffers correctly
func TestXattrOverflow(t *testing.T) {
fn := filepath.Join(test_helpers.DefaultPlainDir, t.Name())
- ioutil.WriteFile(fn, nil, 0600)
+ os.WriteFile(fn, nil, 0600)
attr := "user.foo123"
val := []byte("12341234")