@@ -20,7 +20,6 @@ import (
20
20
"fmt"
21
21
"math/rand"
22
22
"os"
23
- "path"
24
23
"path/filepath"
25
24
"testing"
26
25
@@ -376,7 +375,7 @@ func TestPluginConstructVolumeSpec(t *testing.T) {
376
375
csiMounter := mounter .(* csiMountMgr )
377
376
378
377
// rebuild spec
379
- spec , err := plug .ConstructVolumeSpec ("test-pv" , path .Dir (csiMounter .GetPath ()))
378
+ spec , err := plug .ConstructVolumeSpec ("test-pv" , filepath .Dir (csiMounter .GetPath ()))
380
379
if err != nil {
381
380
t .Fatal (err )
382
381
}
@@ -508,7 +507,7 @@ func TestPluginConstructVolumeSpecWithInline(t *testing.T) {
508
507
csiMounter := mounter .(* csiMountMgr )
509
508
510
509
// rebuild spec
511
- spec , err := plug .ConstructVolumeSpec ("test-pv" , path .Dir (csiMounter .GetPath ()))
510
+ spec , err := plug .ConstructVolumeSpec ("test-pv" , filepath .Dir (csiMounter .GetPath ()))
512
511
if err != nil {
513
512
t .Fatal (err )
514
513
}
@@ -636,7 +635,7 @@ func TestPluginNewMounter(t *testing.T) {
636
635
}
637
636
638
637
// ensure data file is created
639
- dataDir := path .Dir (mounter .GetPath ())
638
+ dataDir := filepath .Dir (mounter .GetPath ())
640
639
dataFile := filepath .Join (dataDir , volDataFileName )
641
640
if _ , err := os .Stat (dataFile ); err != nil {
642
641
if os .IsNotExist (err ) {
@@ -775,7 +774,7 @@ func TestPluginNewMounterWithInline(t *testing.T) {
775
774
}
776
775
777
776
// ensure data file is created
778
- dataDir := path .Dir (mounter .GetPath ())
777
+ dataDir := filepath .Dir (mounter .GetPath ())
779
778
dataFile := filepath .Join (dataDir , volDataFileName )
780
779
if _ , err := os .Stat (dataFile ); err != nil {
781
780
if os .IsNotExist (err ) {
@@ -834,7 +833,7 @@ func TestPluginNewUnmounter(t *testing.T) {
834
833
}
835
834
836
835
if err := saveVolumeData (
837
- path .Dir (dir ),
836
+ filepath .Dir (dir ),
838
837
volDataFileName ,
839
838
map [string ]string {
840
839
volDataKey .specVolID : pv .ObjectMeta .Name ,
0 commit comments