@@ -38,7 +38,7 @@ import (
38
38
"sigs.k8s.io/controller-runtime/pkg/client/fake"
39
39
)
40
40
41
- func testNodeServer (t * testing.T , client client.Client , reporter StatsReporter , rotationConfig * RotationConfig ) (* nodeServer , error ) {
41
+ func testNodeServer (t * testing.T , client client.Client , reporter StatsReporter , rotationConfig * rotationConfig ) (* nodeServer , error ) {
42
42
t .Helper ()
43
43
44
44
// Create a mock provider named "provider1".
@@ -228,7 +228,7 @@ func TestNodePublishVolume_Errors(t *testing.T) {
228
228
t .Run (test .name , func (t * testing.T ) {
229
229
r := mocks .NewFakeReporter ()
230
230
231
- ns , err := testNodeServer (t , fake .NewClientBuilder ().WithScheme (s ).WithObjects (test .initObjects ... ).Build (), r , & RotationConfig {})
231
+ ns , err := testNodeServer (t , fake .NewClientBuilder ().WithScheme (s ).WithObjects (test .initObjects ... ).Build (), r , & rotationConfig {})
232
232
if err != nil {
233
233
t .Fatalf ("expected error to be nil, got: %+v" , err )
234
234
}
@@ -268,7 +268,7 @@ func TestNodePublishVolume(t *testing.T) {
268
268
name string
269
269
nodePublishVolReq * csi.NodePublishVolumeRequest
270
270
initObjects []client.Object
271
- rotationConfig * RotationConfig
271
+ rotationConfig * rotationConfig
272
272
}{
273
273
{
274
274
name : "volume mount" ,
@@ -296,7 +296,7 @@ func TestNodePublishVolume(t *testing.T) {
296
296
},
297
297
},
298
298
},
299
- rotationConfig : & RotationConfig {
299
+ rotationConfig : & rotationConfig {
300
300
enabled : false ,
301
301
rotationPollInterval : time .Minute ,
302
302
},
@@ -330,7 +330,7 @@ func TestNodePublishVolume(t *testing.T) {
330
330
},
331
331
},
332
332
},
333
- rotationConfig : & RotationConfig {
333
+ rotationConfig : & rotationConfig {
334
334
enabled : true ,
335
335
rotationPollInterval : - 1 * time .Minute , // Using negative interval to pass the rotation interval check in unit tests
336
336
},
@@ -361,7 +361,7 @@ func TestNodePublishVolume(t *testing.T) {
361
361
},
362
362
},
363
363
},
364
- rotationConfig : & RotationConfig {
364
+ rotationConfig : & rotationConfig {
365
365
enabled : true ,
366
366
rotationPollInterval : time .Minute ,
367
367
},
@@ -427,7 +427,7 @@ func TestNodeUnpublishVolume(t *testing.T) {
427
427
)
428
428
429
429
r := mocks .NewFakeReporter ()
430
- ns , err := testNodeServer (t , fake .NewClientBuilder ().WithScheme (s ).Build (), r , & RotationConfig {})
430
+ ns , err := testNodeServer (t , fake .NewClientBuilder ().WithScheme (s ).Build (), r , & rotationConfig {})
431
431
if err != nil {
432
432
t .Fatalf ("expected error to be nil, got: %+v" , err )
433
433
}
@@ -506,7 +506,7 @@ func TestNodeUnpublishVolume_Error(t *testing.T) {
506
506
for _ , test := range tests {
507
507
t .Run (test .name , func (t * testing.T ) {
508
508
r := mocks .NewFakeReporter ()
509
- ns , err := testNodeServer (t , fake .NewClientBuilder ().WithScheme (s ).Build (), r , & RotationConfig {})
509
+ ns , err := testNodeServer (t , fake .NewClientBuilder ().WithScheme (s ).Build (), r , & rotationConfig {})
510
510
if err != nil {
511
511
t .Fatalf ("expected error to be nil, got: %+v" , err )
512
512
}
0 commit comments