From 9e8f1f4cf3b10adc806acfa582b0ac4036b5d6fb Mon Sep 17 00:00:00 2001 From: hanenMizouni Date: Tue, 12 Nov 2024 15:56:14 +0000 Subject: [PATCH] replace deprecated ioutil.TempDir Signed-off-by: hanenMizouni --- pkg/driver/mount_test.go | 8 ++++---- pkg/driver/sanity_test.go | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) 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) }