@@ -388,12 +388,11 @@ func _test_no_labels(c k8sclient.Client, t *testing.T) {
388388 podsInCLB , err := identifyPodsInCLBDueToInvalidResolvConf (c )
389389
390390 if err != nil {
391- t . Fatalf ( fmt .Sprintf ("Failed to identify Pods in CLB when there " +
392- "is none. Got error: %v " , err ) )
391+ msg := fmt .Sprintf ("Failed to identify Pods in CLB when there is none. Got error: %v" , err )
392+ t . Fatalf ( "%s " , msg )
393393 }
394394 if len (podsInCLB ) > 0 {
395- t .Fatalf ("Incorrect identification of pods in CLB. Identified " +
396- "pods in CLB when there should be None." )
395+ t .Fatalf ("Incorrect identification of pods in CLB. Identified pods in CLB when there should be None." )
397396 }
398397}
399398
@@ -422,12 +421,11 @@ func _test_normal_running(c k8sclient.Client, t *testing.T) {
422421 c .Update (context .TODO (), nodeAgentPod )
423422 podsInCLB , err := identifyPodsInCLBDueToInvalidResolvConf (c )
424423 if err != nil {
425- t . Fatalf ( fmt .Sprintf ("Failed to identify Pods in CLB when there " +
426- "is none. Got error: %v " , err ) )
424+ msg := fmt .Sprintf ("Failed to identify Pods in CLB when there is none. Got error: %v" , err )
425+ t . Fatalf ( "%s " , msg )
427426 }
428427 if len (podsInCLB ) > 0 {
429- t .Fatalf ("Incorrect identification of pods in CLB. Identified " +
430- "pods in CLB when there should be None." )
428+ t .Fatalf ("Incorrect identification of pods in CLB. Identified pods in CLB when there should be None." )
431429 }
432430}
433431
@@ -464,12 +462,11 @@ func _test_clb_but_not_invalid_resolv(c k8sclient.Client, t *testing.T) {
464462 }
465463 podsInCLB , err := identifyPodsInCLBDueToInvalidResolvConf (c )
466464 if err != nil {
467- t . Fatalf ( fmt .Sprintf ("Failed to identify Pods in CLB when there " +
468- "is none. Got error: %v " , err ) )
465+ msg := fmt .Sprintf ("Failed to identify Pods in CLB when there is none. Got error: %v" , err )
466+ t . Fatalf ( "%s " , msg )
469467 }
470468 if len (podsInCLB ) > 0 {
471- t .Fatalf ("Incorrect identification of pods in CLB. Identified " +
472- "pods in CLB when there should be None." )
469+ t .Fatalf ("Incorrect identification of pods in CLB. Identified pods in CLB when there should be None." )
473470 }
474471}
475472
@@ -507,12 +504,11 @@ func _test_clb_due_to_invalid_resolv(c k8sclient.Client, t *testing.T) {
507504 }
508505 podsInCLB , err := identifyPodsInCLBDueToInvalidResolvConf (c )
509506 if err != nil {
510- t . Fatalf ( fmt .Sprintf ("Failed to identify Pods in CLB when there " +
511- "is none. Got error: %v " , err ) )
507+ msg := fmt .Sprintf ("Failed to identify Pods in CLB when there is none. Got error: %v" , err )
508+ t . Fatalf ( "%s " , msg )
512509 }
513510 if len (podsInCLB ) == 0 {
514- t .Fatalf ("Incorrect identification of pods in CLB. No pods " +
515- "identified in CLB when expected." )
511+ t .Fatalf ("Incorrect identification of pods in CLB. No pods identified in CLB when expected." )
516512 }
517513}
518514
0 commit comments