File tree 1 file changed +3
-3
lines changed 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -332,7 +332,7 @@ func TestNodePublishVolume(t *testing.T) {
332
332
},
333
333
rotationConfig : & RotationConfig {
334
334
enabled : true ,
335
- interval : time .Minute ,
335
+ interval : - 1 * time .Minute , // Using negative interval to pass the rotation interval check in unit tests
336
336
},
337
337
},
338
338
{
@@ -407,8 +407,8 @@ func TestNodePublishVolume(t *testing.T) {
407
407
t .Fatalf ("expected err to be nil, got: %v" , err )
408
408
}
409
409
expectedMounts := 1
410
- if ns .rotationConfig .enabled {
411
- // If rotation time is not enabled , there should not be any mounts.
410
+ if ns .rotationConfig .enabled && ns . rotationConfig . interval > 0 {
411
+ // If due to rotation interval, NodePublishVolume has skipped , there should not be any mount operation
412
412
expectedMounts = 0
413
413
}
414
414
if len (mnts ) != expectedMounts {
You can’t perform that action at this time.
0 commit comments