@@ -47,7 +47,7 @@ func TestCanSupport(t *testing.T) {
47
47
}
48
48
defer os .RemoveAll (tmpDir )
49
49
plugMgr := volume.VolumePluginMgr {}
50
- plugMgr .InitPlugins (ProbeVolumePlugins (), nil /* prober */ , volumetest .NewFakeVolumeHost (tmpDir , nil , nil ))
50
+ plugMgr .InitPlugins (ProbeVolumePlugins (), nil /* prober */ , volumetest .NewFakeVolumeHost (t , tmpDir , nil , nil ))
51
51
52
52
plug , err := plugMgr .FindPluginByName ("kubernetes.io/azure-file" )
53
53
if err != nil {
@@ -71,7 +71,7 @@ func TestGetAccessModes(t *testing.T) {
71
71
}
72
72
defer os .RemoveAll (tmpDir )
73
73
plugMgr := volume.VolumePluginMgr {}
74
- plugMgr .InitPlugins (ProbeVolumePlugins (), nil /* prober */ , volumetest .NewFakeVolumeHost (tmpDir , nil , nil ))
74
+ plugMgr .InitPlugins (ProbeVolumePlugins (), nil /* prober */ , volumetest .NewFakeVolumeHost (t , tmpDir , nil , nil ))
75
75
76
76
plug , err := plugMgr .FindPersistentPluginByName ("kubernetes.io/azure-file" )
77
77
if err != nil {
@@ -106,20 +106,20 @@ func getTestTempDir(t *testing.T) string {
106
106
func TestPluginAzureCloudProvider (t * testing.T ) {
107
107
tmpDir := getTestTempDir (t )
108
108
defer os .RemoveAll (tmpDir )
109
- testPlugin (t , tmpDir , volumetest .NewFakeVolumeHostWithCloudProvider (tmpDir , nil , nil , getAzureTestCloud (t )))
109
+ testPlugin (t , tmpDir , volumetest .NewFakeVolumeHostWithCloudProvider (t , tmpDir , nil , nil , getAzureTestCloud (t )))
110
110
}
111
111
112
112
func TestPluginWithoutCloudProvider (t * testing.T ) {
113
113
tmpDir := getTestTempDir (t )
114
114
defer os .RemoveAll (tmpDir )
115
- testPlugin (t , tmpDir , volumetest .NewFakeVolumeHost (tmpDir , nil , nil ))
115
+ testPlugin (t , tmpDir , volumetest .NewFakeVolumeHost (t , tmpDir , nil , nil ))
116
116
}
117
117
118
118
func TestPluginWithOtherCloudProvider (t * testing.T ) {
119
119
tmpDir := getTestTempDir (t )
120
120
defer os .RemoveAll (tmpDir )
121
121
cloud := & fakecloud.Cloud {}
122
- testPlugin (t , tmpDir , volumetest .NewFakeVolumeHostWithCloudProvider (tmpDir , nil , nil , cloud ))
122
+ testPlugin (t , tmpDir , volumetest .NewFakeVolumeHostWithCloudProvider (t , tmpDir , nil , nil , cloud ))
123
123
}
124
124
125
125
func testPlugin (t * testing.T , tmpDir string , volumeHost volume.VolumeHost ) {
@@ -214,7 +214,7 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) {
214
214
client := fake .NewSimpleClientset (pv , claim )
215
215
216
216
plugMgr := volume.VolumePluginMgr {}
217
- plugMgr .InitPlugins (ProbeVolumePlugins (), nil /* prober */ , volumetest .NewFakeVolumeHost ("/tmp/fake" , client , nil ))
217
+ plugMgr .InitPlugins (ProbeVolumePlugins (), nil /* prober */ , volumetest .NewFakeVolumeHost (t , "/tmp/fake" , client , nil ))
218
218
plug , _ := plugMgr .FindPluginByName (azureFilePluginName )
219
219
220
220
// readOnly bool is supplied by persistent-claim volume source when its mounter creates other volumes
@@ -246,7 +246,7 @@ func TestMounterAndUnmounterTypeAssert(t *testing.T) {
246
246
}
247
247
defer os .RemoveAll (tmpDir )
248
248
plugMgr := volume.VolumePluginMgr {}
249
- plugMgr .InitPlugins (ProbeVolumePlugins (), nil /* prober */ , volumetest .NewFakeVolumeHost (tmpDir , nil , nil ))
249
+ plugMgr .InitPlugins (ProbeVolumePlugins (), nil /* prober */ , volumetest .NewFakeVolumeHost (t , tmpDir , nil , nil ))
250
250
251
251
plug , err := plugMgr .FindPluginByName ("kubernetes.io/azure-file" )
252
252
if err != nil {
0 commit comments