@@ -141,6 +141,7 @@ func TestCiliumCCMLoadBalancers(t *testing.T) {
141141 f : testCiliumUpdateLoadBalancerAddNodeWithNewIpHolderNamingConvention ,
142142 },
143143 }
144+ //nolint: paralleltest // two tests use t.Setenv, which fails after t.Parallel() call
144145 for _ , tc := range testCases {
145146 ctrl := gomock .NewController (t )
146147 mc := mocks .NewMockClient (ctrl )
@@ -180,13 +181,17 @@ func createTestService() *v1.Service {
180181}
181182
182183func addService (t * testing.T , kubeClient kubernetes.Interface , svc * v1.Service ) {
184+ t .Helper ()
185+
183186 _ , err := kubeClient .CoreV1 ().Services (svc .Namespace ).Create (context .TODO (), svc , metav1.CreateOptions {})
184187 if err != nil {
185188 t .Fatalf ("failed to add Service: %v" , err )
186189 }
187190}
188191
189192func addNodes (t * testing.T , kubeClient kubernetes.Interface , nodes []* v1.Node ) {
193+ t .Helper ()
194+
190195 for _ , node := range nodes {
191196 _ , err := kubeClient .CoreV1 ().Nodes ().Create (context .TODO (), node , metav1.CreateOptions {})
192197 if err != nil {
@@ -206,6 +211,8 @@ func createNewIpHolderInstance() linodego.Instance {
206211}
207212
208213func testNoBGPNodeLabel (t * testing.T , mc * mocks.MockClient ) {
214+ t .Helper ()
215+
209216 Options .BGPNodeSelector = ""
210217 Options .IpHolderSuffix = clusterName
211218 t .Setenv ("BGP_PEER_PREFIX" , "2600:3cef" )
@@ -255,6 +262,8 @@ func testNoBGPNodeLabel(t *testing.T, mc *mocks.MockClient) {
255262}
256263
257264func testUnsupportedRegion (t * testing.T , mc * mocks.MockClient ) {
265+ t .Helper ()
266+
258267 Options .BGPNodeSelector = nodeSelector
259268 svc := createTestService ()
260269
@@ -284,6 +293,8 @@ func testUnsupportedRegion(t *testing.T, mc *mocks.MockClient) {
284293}
285294
286295func testCreateWithExistingIPHolderWithOldIpHolderNamingConvention (t * testing.T , mc * mocks.MockClient ) {
296+ t .Helper ()
297+
287298 Options .BGPNodeSelector = nodeSelector
288299 svc := createTestService ()
289300 newIpHolderInstance = createNewIpHolderInstance ()
@@ -323,6 +334,8 @@ func testCreateWithExistingIPHolderWithOldIpHolderNamingConvention(t *testing.T,
323334}
324335
325336func testCreateWithExistingIPHolderWithNewIpHolderNamingConvention (t * testing.T , mc * mocks.MockClient ) {
337+ t .Helper ()
338+
326339 Options .BGPNodeSelector = nodeSelector
327340 Options .IpHolderSuffix = clusterName
328341 svc := createTestService ()
@@ -363,6 +376,8 @@ func testCreateWithExistingIPHolderWithNewIpHolderNamingConvention(t *testing.T,
363376}
364377
365378func testCreateWithExistingIPHolderWithNewIpHolderNamingConventionUsingLongSuffix (t * testing.T , mc * mocks.MockClient ) {
379+ t .Helper ()
380+
366381 Options .BGPNodeSelector = nodeSelector
367382 Options .IpHolderSuffix = "OaTJrRuufacHVougjwkpBpmstiqvswvBNEMWXsRYfMBTCkKIUTXpbGIcIbDWSQp"
368383 svc := createTestService ()
@@ -403,6 +418,8 @@ func testCreateWithExistingIPHolderWithNewIpHolderNamingConventionUsingLongSuffi
403418}
404419
405420func testCreateWithNoExistingIPHolderUsingNoSuffix (t * testing.T , mc * mocks.MockClient ) {
421+ t .Helper ()
422+
406423 Options .BGPNodeSelector = nodeSelector
407424 Options .IpHolderSuffix = ""
408425 svc := createTestService ()
@@ -447,6 +464,8 @@ func testCreateWithNoExistingIPHolderUsingNoSuffix(t *testing.T, mc *mocks.MockC
447464}
448465
449466func testCreateWithNoExistingIPHolderUsingShortSuffix (t * testing.T , mc * mocks.MockClient ) {
467+ t .Helper ()
468+
450469 Options .BGPNodeSelector = nodeSelector
451470 Options .IpHolderSuffix = clusterName
452471 svc := createTestService ()
@@ -491,6 +510,8 @@ func testCreateWithNoExistingIPHolderUsingShortSuffix(t *testing.T, mc *mocks.Mo
491510}
492511
493512func testCreateWithNoExistingIPHolderUsingLongSuffix (t * testing.T , mc * mocks.MockClient ) {
513+ t .Helper ()
514+
494515 Options .BGPNodeSelector = nodeSelector
495516 Options .IpHolderSuffix = "OaTJrRuufacHVougjwkpBpmstiqvswvBNEMWXsRYfMBTCkKIUTXpbGIcIbDWSQp"
496517 svc := createTestService ()
@@ -535,6 +556,8 @@ func testCreateWithNoExistingIPHolderUsingLongSuffix(t *testing.T, mc *mocks.Moc
535556}
536557
537558func testEnsureCiliumLoadBalancerDeletedWithOldIpHolderNamingConvention (t * testing.T , mc * mocks.MockClient ) {
559+ t .Helper ()
560+
538561 Options .BGPNodeSelector = nodeSelector
539562 svc := createTestService ()
540563
@@ -561,6 +584,8 @@ func testEnsureCiliumLoadBalancerDeletedWithOldIpHolderNamingConvention(t *testi
561584}
562585
563586func testEnsureCiliumLoadBalancerDeletedWithNewIpHolderNamingConvention (t * testing.T , mc * mocks.MockClient ) {
587+ t .Helper ()
588+
564589 Options .BGPNodeSelector = nodeSelector
565590 Options .IpHolderSuffix = clusterName
566591 svc := createTestService ()
@@ -592,6 +617,8 @@ func testEnsureCiliumLoadBalancerDeletedWithNewIpHolderNamingConvention(t *testi
592617}
593618
594619func testCiliumUpdateLoadBalancerAddNodeWithOldIpHolderNamingConvention (t * testing.T , mc * mocks.MockClient ) {
620+ t .Helper ()
621+
595622 Options .BGPNodeSelector = nodeSelector
596623 svc := createTestService ()
597624
@@ -648,6 +675,8 @@ func testCiliumUpdateLoadBalancerAddNodeWithOldIpHolderNamingConvention(t *testi
648675}
649676
650677func testCiliumUpdateLoadBalancerAddNodeWithNewIpHolderNamingConvention (t * testing.T , mc * mocks.MockClient ) {
678+ t .Helper ()
679+
651680 Options .BGPNodeSelector = nodeSelector
652681 Options .IpHolderSuffix = clusterName
653682 svc := createTestService ()
0 commit comments