@@ -179,12 +179,12 @@ func TestNodeStageVolume(t *testing.T) {
179179 skipOnWindows : true ,
180180 flakyWindowsErrorMessage : fmt .Sprintf ("rpc error: code = Internal desc = volume(vol_1##) mount \" %s\" on %#v failed " +
181181 "with NewSmbGlobalMapping(%s, %s) failed with error: rpc error: code = Unknown desc = NewSmbGlobalMapping failed." ,
182- strings .Replace (testSource , "\\ " , "\\ \\ " , - 1 ), errorMountSensSource , testSource , errorMountSensSource ),
182+ strings .ReplaceAll (testSource , "\\ " , "\\ \\ " ), errorMountSensSource , testSource , errorMountSensSource ),
183183 expectedErr : testutil.TestError {
184184 DefaultError : status .Errorf (codes .Internal ,
185185 "volume(vol_1##) mount \" %s\" on \" %s\" failed with fake " +
186186 "MountSensitive: target error" ,
187- strings .Replace (testSource , "\\ " , "\\ \\ " , - 1 ), errorMountSensSource ),
187+ strings .ReplaceAll (testSource , "\\ " , "\\ \\ " ), errorMountSensSource ),
188188 },
189189 },
190190 {
@@ -196,12 +196,12 @@ func TestNodeStageVolume(t *testing.T) {
196196 skipOnWindows : true ,
197197 flakyWindowsErrorMessage : fmt .Sprintf ("rpc error: code = Internal desc = volume(vol_1##) mount \" %s\" on %#v failed " +
198198 "with NewSmbGlobalMapping(%s, %s) failed with error: rpc error: code = Unknown desc = NewSmbGlobalMapping failed." ,
199- strings .Replace (testSource , "\\ " , "\\ \\ " , - 1 ), errorMountSensSource , testSource , errorMountSensSource ),
199+ strings .ReplaceAll (testSource , "\\ " , "\\ \\ " ), errorMountSensSource , testSource , errorMountSensSource ),
200200 expectedErr : testutil.TestError {
201201 DefaultError : status .Errorf (codes .Internal ,
202202 "volume(vol_1##) mount \" %s\" on \" %s\" failed with fake " +
203203 "MountSensitive: target error" ,
204- strings .Replace (testSource , "\\ " , "\\ \\ " , - 1 ), errorMountSensSource ),
204+ strings .ReplaceAll (testSource , "\\ " , "\\ \\ " ), errorMountSensSource ),
205205 },
206206 },
207207 {
@@ -213,7 +213,7 @@ func TestNodeStageVolume(t *testing.T) {
213213 skipOnWindows : true ,
214214 flakyWindowsErrorMessage : fmt .Sprintf ("rpc error: code = Internal desc = volume(vol_1##) mount \" %s\" on %#v failed with " +
215215 "NewSmbGlobalMapping(%s, %s) failed with error: rpc error: code = Unknown desc = NewSmbGlobalMapping failed." ,
216- strings .Replace (testSource , "\\ " , "\\ \\ " , - 1 ), sourceTest , testSource , sourceTest ),
216+ strings .ReplaceAll (testSource , "\\ " , "\\ \\ " ), sourceTest , testSource , sourceTest ),
217217 expectedErr : testutil.TestError {},
218218 },
219219 {
@@ -225,7 +225,7 @@ func TestNodeStageVolume(t *testing.T) {
225225 skipOnWindows : true ,
226226 flakyWindowsErrorMessage : fmt .Sprintf ("rpc error: code = Internal desc = volume(vol_1##) mount \" %s\" on %#v failed with " +
227227 "NewSmbGlobalMapping(%s, %s) failed with error: rpc error: code = Unknown desc = NewSmbGlobalMapping failed." ,
228- strings .Replace (testSource , "\\ " , "\\ \\ " , - 1 ), sourceTest , testSource , sourceTest ),
228+ strings .ReplaceAll (testSource , "\\ " , "\\ \\ " ), sourceTest , testSource , sourceTest ),
229229 expectedErr : testutil.TestError {},
230230 },
231231 {
@@ -237,7 +237,7 @@ func TestNodeStageVolume(t *testing.T) {
237237 skipOnWindows : true ,
238238 flakyWindowsErrorMessage : fmt .Sprintf ("rpc error: code = Internal desc = volume(vol_1##) mount \" %s\" on %#v failed with " +
239239 "NewSmbGlobalMapping(%s, %s) failed with error: rpc error: code = Unknown desc = NewSmbGlobalMapping failed." ,
240- strings .Replace (testSource , "\\ " , "\\ \\ " , - 1 ), sourceTest , testSource , sourceTest ),
240+ strings .ReplaceAll (testSource , "\\ " , "\\ \\ " ), sourceTest , testSource , sourceTest ),
241241 expectedErr : testutil.TestError {},
242242 },
243243 {
@@ -249,7 +249,7 @@ func TestNodeStageVolume(t *testing.T) {
249249 skipOnWindows : true ,
250250 flakyWindowsErrorMessage : fmt .Sprintf ("rpc error: code = Internal desc = volume(vol_1##) mount \" %s\" on %#v failed with " +
251251 "NewSmbGlobalMapping(%s, %s) failed with error: rpc error: code = Unknown desc = NewSmbGlobalMapping failed." ,
252- strings .Replace (testSource , "\\ " , "\\ \\ " , - 1 ), sourceTest , testSource , sourceTest ),
252+ strings .ReplaceAll (testSource , "\\ " , "\\ \\ " ), sourceTest , testSource , sourceTest ),
253253 expectedErr : testutil.TestError {},
254254 },
255255 }
@@ -478,7 +478,7 @@ func TestNodePublishVolume(t *testing.T) {
478478 d .mounter = mounter
479479
480480 for _ , test := range tests {
481- if ! ( test .skipOnWindows && runtime .GOOS == "windows" ) {
481+ if ! test .skipOnWindows || runtime .GOOS != "windows" {
482482 if test .setup != nil {
483483 test .setup (d )
484484 }
@@ -543,7 +543,7 @@ func TestNodeUnpublishVolume(t *testing.T) {
543543 d .mounter = mounter
544544
545545 for _ , test := range tests {
546- if ! ( test .skipOnWindows && runtime .GOOS == "windows" ) {
546+ if ! test .skipOnWindows || runtime .GOOS != "windows" {
547547 if test .setup != nil {
548548 test .setup (d )
549549 }
@@ -619,7 +619,7 @@ func TestNodeUnstageVolume(t *testing.T) {
619619 d .mounter = mounter
620620
621621 for _ , test := range tests {
622- if ! ( test .skipOnWindows && runtime .GOOS == "windows" ) {
622+ if ! test .skipOnWindows || runtime .GOOS != "windows" {
623623 if test .setup != nil {
624624 test .setup (d )
625625 }
0 commit comments