@@ -103,7 +103,8 @@ func TestNewClusterScope(t *testing.T) {
103
103
},
104
104
},
105
105
}
106
- (& infrav1.AzureClusterWebhook {}).Default (context .Background (), azureCluster )
106
+ err := (& infrav1.AzureClusterWebhook {}).Default (context .Background (), azureCluster )
107
+ g .Expect (err ).NotTo (HaveOccurred ())
107
108
108
109
fakeIdentity := & infrav1.AzureClusterIdentity {
109
110
Spec : infrav1.AzureClusterIdentitySpec {
@@ -117,7 +118,7 @@ func TestNewClusterScope(t *testing.T) {
117
118
initObjects := []runtime.Object {cluster , azureCluster , fakeIdentity , fakeSecret }
118
119
fakeClient := fake .NewClientBuilder ().WithScheme (scheme ).WithRuntimeObjects (initObjects ... ).Build ()
119
120
120
- _ , err : = NewClusterScope (context .TODO (), ClusterScopeParams {
121
+ _ , err = NewClusterScope (context .TODO (), ClusterScopeParams {
121
122
Cluster : cluster ,
122
123
AzureCluster : azureCluster ,
123
124
Client : fakeClient ,
@@ -230,7 +231,8 @@ func TestAPIServerHost(t *testing.T) {
230
231
tc .azureCluster .ObjectMeta = metav1.ObjectMeta {
231
232
Name : cluster .Name ,
232
233
}
233
- (& infrav1.AzureClusterWebhook {}).Default (context .Background (), & tc .azureCluster )
234
+ err := (& infrav1.AzureClusterWebhook {}).Default (context .Background (), & tc .azureCluster )
235
+ g .Expect (err ).NotTo (HaveOccurred ())
234
236
235
237
clusterScope := & ClusterScope {
236
238
Cluster : cluster ,
@@ -388,7 +390,8 @@ func TestGettingSecurityRules(t *testing.T) {
388
390
t .Run (tt .name , func (t * testing.T ) {
389
391
g := NewWithT (t )
390
392
391
- (& infrav1.AzureClusterWebhook {}).Default (context .Background (), tt .azureCluster )
393
+ err := (& infrav1.AzureClusterWebhook {}).Default (context .Background (), tt .azureCluster )
394
+ g .Expect (err ).NotTo (HaveOccurred ())
392
395
393
396
clusterScope := & ClusterScope {
394
397
Cluster : tt .cluster ,
@@ -2276,7 +2279,8 @@ func TestOutboundLBName(t *testing.T) {
2276
2279
azureCluster .Spec .NetworkSpec .NodeOutboundLB = tc .nodeOutboundLB
2277
2280
}
2278
2281
2279
- (& infrav1.AzureClusterWebhook {}).Default (context .Background (), azureCluster )
2282
+ err := (& infrav1.AzureClusterWebhook {}).Default (context .Background (), azureCluster )
2283
+ g .Expect (err ).NotTo (HaveOccurred ())
2280
2284
2281
2285
clusterScope := & ClusterScope {
2282
2286
AzureCluster : azureCluster ,
@@ -2390,7 +2394,8 @@ func TestBackendPoolName(t *testing.T) {
2390
2394
},
2391
2395
}
2392
2396
2393
- (& infrav1.AzureClusterWebhook {}).Default (context .Background (), azureCluster )
2397
+ err := (& infrav1.AzureClusterWebhook {}).Default (context .Background (), azureCluster )
2398
+ g .Expect (err ).NotTo (HaveOccurred ())
2394
2399
2395
2400
if tc .customAPIServerBackendPoolName != "" {
2396
2401
azureCluster .Spec .NetworkSpec .APIServerLB .BackendPool .Name = tc .customAPIServerBackendPoolName
@@ -2503,7 +2508,8 @@ func TestOutboundPoolName(t *testing.T) {
2503
2508
}
2504
2509
}
2505
2510
2506
- (& infrav1.AzureClusterWebhook {}).Default (context .Background (), azureCluster )
2511
+ err := (& infrav1.AzureClusterWebhook {}).Default (context .Background (), azureCluster )
2512
+ g .Expect (err ).NotTo (HaveOccurred ())
2507
2513
2508
2514
clusterScope := & ClusterScope {
2509
2515
AzureCluster : azureCluster ,
0 commit comments