@@ -37,7 +37,7 @@ import (
37
37
"sigs.k8s.io/controller-runtime/pkg/client/fake"
38
38
)
39
39
40
- func testNodeServer (t * testing.T , client client.Client , reporter StatsReporter ) (* nodeServer , error ) {
40
+ func testNodeServer (t * testing.T , client client.Client , reporter StatsReporter , rotationConfig * RotationConfig ) (* nodeServer , error ) {
41
41
t .Helper ()
42
42
43
43
// Create a mock provider named "provider1".
@@ -53,7 +53,7 @@ func testNodeServer(t *testing.T, client client.Client, reporter StatsReporter)
53
53
t .Cleanup (server .Stop )
54
54
55
55
providerClients := NewPluginClientBuilder ([]string {socketPath })
56
- return newNodeServer ("testnode" , mount .NewFakeMounter ([]mount.MountPoint {}), providerClients , client , client , reporter )
56
+ return newNodeServer ("testnode" , mount .NewFakeMounter ([]mount.MountPoint {}), providerClients , client , client , reporter , rotationConfig )
57
57
}
58
58
59
59
func TestNodePublishVolume_Errors (t * testing.T ) {
@@ -227,7 +227,7 @@ func TestNodePublishVolume_Errors(t *testing.T) {
227
227
t .Run (test .name , func (t * testing.T ) {
228
228
r := mocks .NewFakeReporter ()
229
229
230
- ns , err := testNodeServer (t , fake .NewClientBuilder ().WithScheme (s ).WithObjects (test .initObjects ... ).Build (), r )
230
+ ns , err := testNodeServer (t , fake .NewClientBuilder ().WithScheme (s ).WithObjects (test .initObjects ... ).Build (), r , & RotationConfig {} )
231
231
if err != nil {
232
232
t .Fatalf ("expected error to be nil, got: %+v" , err )
233
233
}
@@ -338,7 +338,7 @@ func TestNodePublishVolume(t *testing.T) {
338
338
t .Run (test .name , func (t * testing.T ) {
339
339
r := mocks .NewFakeReporter ()
340
340
341
- ns , err := testNodeServer (t , fake .NewClientBuilder ().WithScheme (s ).WithObjects (test .initObjects ... ).Build (), r )
341
+ ns , err := testNodeServer (t , fake .NewClientBuilder ().WithScheme (s ).WithObjects (test .initObjects ... ).Build (), r , & RotationConfig {} )
342
342
if err != nil {
343
343
t .Fatalf ("expected error to be nil, got: %+v" , err )
344
344
}
@@ -381,7 +381,7 @@ func TestNodeUnpublishVolume(t *testing.T) {
381
381
)
382
382
383
383
r := mocks .NewFakeReporter ()
384
- ns , err := testNodeServer (t , fake .NewClientBuilder ().WithScheme (s ).Build (), r )
384
+ ns , err := testNodeServer (t , fake .NewClientBuilder ().WithScheme (s ).Build (), r , & RotationConfig {} )
385
385
if err != nil {
386
386
t .Fatalf ("expected error to be nil, got: %+v" , err )
387
387
}
@@ -460,7 +460,7 @@ func TestNodeUnpublishVolume_Error(t *testing.T) {
460
460
for _ , test := range tests {
461
461
t .Run (test .name , func (t * testing.T ) {
462
462
r := mocks .NewFakeReporter ()
463
- ns , err := testNodeServer (t , fake .NewClientBuilder ().WithScheme (s ).Build (), r )
463
+ ns , err := testNodeServer (t , fake .NewClientBuilder ().WithScheme (s ).Build (), r , & RotationConfig {} )
464
464
if err != nil {
465
465
t .Fatalf ("expected error to be nil, got: %+v" , err )
466
466
}
0 commit comments