diff options
| author | Jakob Unterwurzacher | 2025-07-07 19:54:48 +0200 | 
|---|---|---|
| committer | Jakob Unterwurzacher | 2025-07-07 19:59:35 +0200 | 
| commit | 8f5df19b353e02ffba842fd1b15ccf93da7ee3b4 (patch) | |
| tree | 8f68b74e56a1d20af82e5093a059d180c925f9be /tests/defaults/acl_test.go | |
| parent | cdb80ea9825d2e876f1cf579bf960e4da7656b4c (diff) | |
Fix a bunch of staticcheck errors
Tool-assisted.
Diffstat (limited to 'tests/defaults/acl_test.go')
| -rw-r--r-- | tests/defaults/acl_test.go | 11 | 
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") | 
