aboutsummaryrefslogtreecommitdiff
path: root/plugin/root/root_test.go
diff options
context:
space:
mode:
authorGravatar Zou Nengren <zouyee1989@gmail.com> 2021-10-13 15:30:31 +0800
committerGravatar GitHub <noreply@github.com> 2021-10-13 09:30:31 +0200
commit5191959bd7278b6ec990093ec708c262d7ef416e (patch)
tree0a48bb5bfd5f18673edee9ab7aa55497aa28eefb /plugin/root/root_test.go
parent44fcca0e0d67d66dee72ef00d389a16c2ff066a9 (diff)
downloadcoredns-5191959bd7278b6ec990093ec708c262d7ef416e.tar.gz
coredns-5191959bd7278b6ec990093ec708c262d7ef416e.tar.zst
coredns-5191959bd7278b6ec990093ec708c262d7ef416e.zip
cleanup deprecated package io/ioutil (#4920)
Signed-off-by: zounengren <zouyee1989@gmail.com>
Diffstat (limited to 'plugin/root/root_test.go')
-rw-r--r--plugin/root/root_test.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/plugin/root/root_test.go b/plugin/root/root_test.go
index dde1ae6b7..27bdf84ad 100644
--- a/plugin/root/root_test.go
+++ b/plugin/root/root_test.go
@@ -2,7 +2,6 @@ package root
import (
"fmt"
- "io/ioutil"
"os"
"path/filepath"
"strings"
@@ -24,7 +23,7 @@ func TestRoot(t *testing.T) {
nonExistingDir := filepath.Join(existingDirPath, "highly_unlikely_to_exist_dir")
- existingFile, err := ioutil.TempFile("", "root_test")
+ existingFile, err := os.CreateTemp("", "root_test")
if err != nil {
t.Fatalf("BeforeTest: Failed to create temp file for testing! Error was: %v", err)
}