aboutsummaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
Diffstat (limited to 'actions')
-rw-r--r--actions/config_test.go5
-rw-r--r--actions/hashing_test.go4
-rw-r--r--actions/recovery_test.go5
3 files changed, 6 insertions, 8 deletions
diff --git a/actions/config_test.go b/actions/config_test.go
index 3599667..49838e3 100644
--- a/actions/config_test.go
+++ b/actions/config_test.go
@@ -19,7 +19,6 @@
package actions
import (
- "io/ioutil"
"os"
"path/filepath"
"testing"
@@ -37,7 +36,7 @@ func TestConfigFileIsCreatedWithCorrectMode(t *testing.T) {
defer unix.Umask(oldMask)
unix.Umask(0077)
- tempDir, err := ioutil.TempDir("", "fscrypt")
+ tempDir, err := os.MkdirTemp("", "fscrypt")
if err != nil {
t.Fatal(err)
}
@@ -57,7 +56,7 @@ func TestConfigFileIsCreatedWithCorrectMode(t *testing.T) {
}
func TestCreateConfigFileV2Policy(t *testing.T) {
- tempDir, err := ioutil.TempDir("", "fscrypt")
+ tempDir, err := os.MkdirTemp("", "fscrypt")
if err != nil {
t.Fatal(err)
}
diff --git a/actions/hashing_test.go b/actions/hashing_test.go
index 2e212e9..26f627b 100644
--- a/actions/hashing_test.go
+++ b/actions/hashing_test.go
@@ -20,7 +20,7 @@
package actions
import (
- "io/ioutil"
+ "io"
"log"
"testing"
"time"
@@ -54,7 +54,7 @@ func TestCostsSearch(t *testing.T) {
func benchmarkCostsSearch(b *testing.B, target time.Duration) {
// Disable logging for benchmarks
- log.SetOutput(ioutil.Discard)
+ log.SetOutput(io.Discard)
for i := 0; i < b.N; i++ {
_, err := getHashingCosts(target)
if err != nil {
diff --git a/actions/recovery_test.go b/actions/recovery_test.go
index 5abd0a9..35ade0e 100644
--- a/actions/recovery_test.go
+++ b/actions/recovery_test.go
@@ -19,7 +19,6 @@
package actions
import (
- "io/ioutil"
"os"
"path/filepath"
"strings"
@@ -29,7 +28,7 @@ import (
)
func TestRecoveryPassphrase(t *testing.T) {
- tempDir, err := ioutil.TempDir("", "fscrypt")
+ tempDir, err := os.MkdirTemp("", "fscrypt")
if err != nil {
t.Fatal(err)
}
@@ -71,7 +70,7 @@ func TestRecoveryPassphrase(t *testing.T) {
recoveryFile); err != nil {
t.Fatal(err)
}
- contentsBytes, err := ioutil.ReadFile(recoveryFile)
+ contentsBytes, err := os.ReadFile(recoveryFile)
if err != nil {
t.Fatal(err)
}