diff --git a/pkg/driver/mount_test.go b/pkg/driver/mount_test.go index 42a9e800..f6651671 100644 --- a/pkg/driver/mount_test.go +++ b/pkg/driver/mount_test.go @@ -25,7 +25,7 @@ import ( func TestMakeDir(t *testing.T) { // Setup the full driver and its environment - dir, err := ioutil.TempDir("", "mount-bsu-csi") + dir, err :=os.MkdirTemp("", "mount-bsu-csi") if err != nil { t.Fatalf("error creating directory %v", err) } @@ -52,7 +52,7 @@ func TestMakeDir(t *testing.T) { func TestMakeFile(t *testing.T) { // Setup the full driver and its environment - dir, err := ioutil.TempDir("", "mount-bsu-csi") + dir, err :=os.MkdirTemp("", "mount-bsu-csi") if err != nil { t.Fatalf("error creating directory %v", err) } @@ -80,7 +80,7 @@ func TestMakeFile(t *testing.T) { func TestExistsPath(t *testing.T) { // Setup the full driver and its environment - dir, err := ioutil.TempDir("", "mount-bsu-csi") + dir, err :=os.MkdirTemp("", "mount-bsu-csi") if err != nil { t.Fatalf("error creating directory %v", err) } @@ -106,7 +106,7 @@ func TestExistsPath(t *testing.T) { func TestGetDeviceName(t *testing.T) { // Setup the full driver and its environment - dir, err := ioutil.TempDir("", "mount-bsu-csi") + dir, err :=os.MkdirTemp("", "mount-bsu-csi") if err != nil { t.Fatalf("error creating directory %v", err) } diff --git a/pkg/driver/sanity_test.go b/pkg/driver/sanity_test.go index 68865b2b..745811ec 100644 --- a/pkg/driver/sanity_test.go +++ b/pkg/driver/sanity_test.go @@ -22,7 +22,7 @@ import ( func TestSanity(t *testing.T) { // Setup the full driver and its environment - dir, err := ioutil.TempDir("", "sanity-bsu-csi") + dir, err :=os.MkdirTemp("", "sanity-bsu-csi") if err != nil { t.Fatalf("error creating directory %v", err) }