Skip to content

Commit

Permalink
replace deprecated ioutil.TempDir
Browse files Browse the repository at this point in the history
Signed-off-by: hanenMizouni <[email protected]>
  • Loading branch information
outscale-hmi committed Nov 13, 2024
1 parent ffe4292 commit 9e8f1f4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions pkg/driver/mount_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand All @@ -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)
}
Expand Down Expand Up @@ -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)
}
Expand All @@ -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)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/driver/sanity_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 9e8f1f4

Please sign in to comment.