diff --git a/internal/k8s/configuration_test.go b/internal/k8s/configuration_test.go index 770203fdbf..bf18d4c3d9 100644 --- a/internal/k8s/configuration_test.go +++ b/internal/k8s/configuration_test.go @@ -45,6 +45,7 @@ func createTestConfiguration() *Configuration { } func TestAddIngressForRegularIngress(t *testing.T) { + t.Parallel() configuration := createTestConfiguration() // no problems are expected for all cases @@ -216,6 +217,7 @@ func TestAddIngressForRegularIngress(t *testing.T) { } func TestAddInvalidIngress(t *testing.T) { + t.Parallel() configuration := createTestConfiguration() ing := createTestIngress("ingress", "foo.example.com", "foo.example.com") @@ -3072,6 +3074,7 @@ func TestChooseObjectMetaWinner(t *testing.T) { } func TestSquashResourceChanges(t *testing.T) { + t.Parallel() ingConfig := &IngressConfiguration{ Ingress: createTestIngress("test", "foo.example.com"), } @@ -3256,6 +3259,7 @@ func (rc *testReferenceChecker) IsReferencedByTransportServer(namespace string, } func TestFindResourcesForResourceReference(t *testing.T) { + t.Parallel() regularIng := createTestIngress("regular-ingress", "foo.example.com") master := createTestIngressMaster("master-ingress", "bar.example.com") minion := createTestIngressMinion("minion-ingress", "bar.example.com", "/") @@ -3379,6 +3383,7 @@ func TestFindResourcesForResourceReference(t *testing.T) { } func TestGetResources(t *testing.T) { + t.Parallel() ing := createTestIngress("ingress", "foo.example.com", "bar.example.com") vs := createTestVirtualServer("virtualserver", "qwe.example.com") passTS := createTestTLSPassthroughTransportServer("transportserver", "abc.example.com") @@ -3446,6 +3451,7 @@ func TestGetResources(t *testing.T) { } func TestGetTransportServerMetrics(t *testing.T) { + t.Parallel() tsPass := createTestTLSPassthroughTransportServer("transportserver", "abc.example.com") tsTCP := createTestTransportServer("transportserver-tcp", "tcp-7777", "TCP") tsUDP := createTestTransportServer("transportserver-udp", "udp-7777", "UDP") @@ -3544,6 +3550,7 @@ func TestGetTransportServerMetrics(t *testing.T) { } func TestIsEqualForIngressConfigurations(t *testing.T) { + t.Parallel() regularIng := createTestIngress("regular-ingress", "foo.example.com") ingConfigWithInvalidHost := NewRegularIngressConfiguration(regularIng) @@ -3638,6 +3645,7 @@ func TestIsEqualForIngressConfigurations(t *testing.T) { } func TestIsEqualForVirtualServers(t *testing.T) { + t.Parallel() vs := createTestVirtualServerWithRoutes( "virtualserver", "foo.example.com", @@ -3696,6 +3704,7 @@ func TestIsEqualForVirtualServers(t *testing.T) { } func TestIsEqualForDifferentResources(t *testing.T) { + t.Parallel() ingConfig := NewRegularIngressConfiguration(createTestIngress("ingress", "foo.example.com")) vsConfig := NewVirtualServerConfiguration(createTestVirtualServer("virtualserver", "bar.example.com"), []*conf_v1.VirtualServerRoute{}, []string{}) @@ -3706,6 +3715,7 @@ func TestIsEqualForDifferentResources(t *testing.T) { } func TestCompareConfigurationProblems(t *testing.T) { + t.Parallel() tests := []struct { problem1 *ConfigurationProblem problem2 *ConfigurationProblem diff --git a/internal/k8s/controller_test.go b/internal/k8s/controller_test.go index b1b352edf8..324ec56c4f 100644 --- a/internal/k8s/controller_test.go +++ b/internal/k8s/controller_test.go @@ -30,6 +30,7 @@ import ( ) func TestHasCorrectIngressClass(t *testing.T) { + t.Parallel() ingressClass := "ing-ctrl" incorrectIngressClass := "gce" emptyClass := "" @@ -172,6 +173,7 @@ func deepCopyWithIngressClass(obj interface{}, class string) interface{} { } func TestIngressClassForCustomResources(t *testing.T) { + t.Parallel() ctrl := &LoadBalancerController{ ingressClass: "nginx", } @@ -221,6 +223,7 @@ func TestIngressClassForCustomResources(t *testing.T) { } func TestComparePorts(t *testing.T) { + t.Parallel() scenarios := []struct { sp api_v1.ServicePort cp api_v1.ContainerPort @@ -314,6 +317,7 @@ func TestComparePorts(t *testing.T) { } func TestFindProbeForPods(t *testing.T) { + t.Parallel() pods := []*api_v1.Pod{ { Spec: api_v1.PodSpec{ @@ -404,6 +408,7 @@ func TestFindProbeForPods(t *testing.T) { } func TestGetServicePortForIngressPort(t *testing.T) { + t.Parallel() fakeClient := fake.NewSimpleClientset() cnf := configs.NewConfigurator(&nginx.LocalManager{}, &configs.StaticConfigParams{}, &configs.ConfigParams{}, &version1.TemplateExecutor{}, &version2.TemplateExecutor{}, false, false, nil, false, nil, false) lbc := LoadBalancerController{ @@ -462,6 +467,7 @@ func TestGetServicePortForIngressPort(t *testing.T) { } func TestFormatWarningsMessages(t *testing.T) { + t.Parallel() warnings := []string{"Test warning", "Test warning 2"} expected := "Test warning; Test warning 2" @@ -473,6 +479,7 @@ func TestFormatWarningsMessages(t *testing.T) { } func TestGetEndpointsFromEndpointSlices_DuplicateEndpointsInOneEndpointSlice(t *testing.T) { + t.Parallel() endpointPort := int32(8080) lbc := LoadBalancerController{ @@ -561,6 +568,7 @@ func TestGetEndpointsFromEndpointSlices_DuplicateEndpointsInOneEndpointSlice(t * } func TestGetEndpointsFromEndpointSlices_TwoDifferentEndpointsInOnEndpointSlice(t *testing.T) { + t.Parallel() endpointPort := int32(8080) lbc := LoadBalancerController{ @@ -651,6 +659,7 @@ func TestGetEndpointsFromEndpointSlices_TwoDifferentEndpointsInOnEndpointSlice(t } func TestGetEndpointsFromEndpointSlices_DuplicateEndpointsAcrossTwoEndpointSlices(t *testing.T) { + t.Parallel() endpointPort := int32(8080) lbc := LoadBalancerController{ @@ -770,6 +779,7 @@ func TestGetEndpointsFromEndpointSlices_DuplicateEndpointsAcrossTwoEndpointSlice } func TestGetEndpointsFromEndpointSlices_TwoDifferentEndpointsInOnEndpointSliceOneEndpointNotReady(t *testing.T) { + t.Parallel() endpointPort := int32(8080) lbc := LoadBalancerController{ @@ -858,6 +868,7 @@ func TestGetEndpointsFromEndpointSlices_TwoDifferentEndpointsInOnEndpointSliceOn } func TestGetEndpointsFromEndpointSlices_TwoDifferentEndpointsAcrossTwoEndpointSlicesOneEndpointNotReady(t *testing.T) { + t.Parallel() endpointPort := int32(8080) lbc := LoadBalancerController{ @@ -956,6 +967,7 @@ func TestGetEndpointsFromEndpointSlices_TwoDifferentEndpointsAcrossTwoEndpointSl } func TestGetEndpointsFromEndpointSlices_ErrorsOnInvalidTargetPort(t *testing.T) { + t.Parallel() endpointPort := int32(8080) lbc := LoadBalancerController{ @@ -1027,6 +1039,7 @@ func TestGetEndpointsFromEndpointSlices_ErrorsOnInvalidTargetPort(t *testing.T) } func TestGetEndpointsFromEndpointSlices_ErrorsOnNoEndpointSlicesFound(t *testing.T) { + t.Parallel() lbc := LoadBalancerController{ isNginxPlus: true, } @@ -1076,6 +1089,7 @@ func TestGetEndpointsFromEndpointSlices_ErrorsOnNoEndpointSlicesFound(t *testing } func TestGetEndpointSlicesBySubselectedPods_FindOnePodInOneEndpointSlice(t *testing.T) { + t.Parallel() endpointPort := int32(8080) endpointReady := true boolPointer := func(b bool) *bool { return &b } @@ -1148,6 +1162,7 @@ func TestGetEndpointSlicesBySubselectedPods_FindOnePodInOneEndpointSlice(t *test } func TestGetEndpointSlicesBySubselectedPods_FindOnePodInTwoEndpointSlicesWithDuplicateEndpoints(t *testing.T) { + t.Parallel() endpointPort := int32(8080) endpointReady := true boolPointer := func(b bool) *bool { return &b } @@ -1237,6 +1252,7 @@ func TestGetEndpointSlicesBySubselectedPods_FindOnePodInTwoEndpointSlicesWithDup } func TestGetEndpointSlicesBySubselectedPods_FindTwoPodsInOneEndpointSlice(t *testing.T) { + t.Parallel() endpointPort := int32(8080) endpointReady := true boolPointer := func(b bool) *bool { return &b } @@ -1338,6 +1354,7 @@ func TestGetEndpointSlicesBySubselectedPods_FindTwoPodsInOneEndpointSlice(t *tes } func TestGetEndpointSlicesBySubselectedPods_FindTwoPodsInTwoEndpointSlices(t *testing.T) { + t.Parallel() endpointPort := int32(8080) endpointReady := true boolPointer := func(b bool) *bool { return &b } @@ -1448,6 +1465,7 @@ func TestGetEndpointSlicesBySubselectedPods_FindTwoPodsInTwoEndpointSlices(t *te } func TestGetEndpointSlicesBySubselectedPods_FindOnePodEndpointInOneEndpointSliceWithOneEndpointNotReady(t *testing.T) { + t.Parallel() endpointPort := int32(8080) endpointReadyTrue := true endpointReadyFalse := false @@ -1543,6 +1561,7 @@ func TestGetEndpointSlicesBySubselectedPods_FindOnePodEndpointInOneEndpointSlice } func TestGetEndpointSlicesBySubselectedPods_FindOnePodEndpointInTwoEndpointSlicesWithOneEndpointNotReady(t *testing.T) { + t.Parallel() endpointPort := int32(8080) endpointReadyTrue := true endpointReadyFalse := false @@ -1647,6 +1666,7 @@ func TestGetEndpointSlicesBySubselectedPods_FindOnePodEndpointInTwoEndpointSlice } func TestGetEndpointSlicesBySubselectedPods_FindNoPods(t *testing.T) { + t.Parallel() endpointPort := int32(8080) endpointReady := true boolPointer := func(b bool) *bool { return &b } @@ -1711,6 +1731,7 @@ func TestGetEndpointSlicesBySubselectedPods_FindNoPods(t *testing.T) { } func TestGetEndpointSlicesBySubselectedPods_TargetPortMismatch(t *testing.T) { + t.Parallel() endpointPort := int32(8080) boolPointer := func(b bool) *bool { return &b } @@ -1788,6 +1809,7 @@ func unorderedEqual(got, want []podEndpoint) bool { } func TestGetStatusFromEventTitle(t *testing.T) { + t.Parallel() tests := []struct { eventTitle string expected string @@ -1847,6 +1869,7 @@ func TestGetStatusFromEventTitle(t *testing.T) { } func TestGetPolicies(t *testing.T) { + t.Parallel() validPolicy := &conf_v1.Policy{ ObjectMeta: meta_v1.ObjectMeta{ Name: "valid-policy", @@ -1946,6 +1969,7 @@ func TestGetPolicies(t *testing.T) { } func TestCreatePolicyMap(t *testing.T) { + t.Parallel() policies := []*conf_v1.Policy{ { ObjectMeta: meta_v1.ObjectMeta{ @@ -2001,6 +2025,7 @@ func TestCreatePolicyMap(t *testing.T) { } func TestGetPodOwnerTypeAndName(t *testing.T) { + t.Parallel() tests := []struct { desc string expType string @@ -2144,6 +2169,7 @@ func (t *testResource) String() string { } func TestRemoveDuplicateResources(t *testing.T) { + t.Parallel() tests := []struct { resources []Resource expected []Resource @@ -2182,6 +2208,7 @@ func TestRemoveDuplicateResources(t *testing.T) { } func TestFindPoliciesForSecret(t *testing.T) { + t.Parallel() jwtPol1 := &conf_v1.Policy{ ObjectMeta: meta_v1.ObjectMeta{ Name: "jwt-policy", @@ -2398,6 +2425,7 @@ func errorComparer(e1, e2 error) bool { } func TestAddJWTSecrets(t *testing.T) { + t.Parallel() invalidErr := errors.New("invalid") validJWKSecret := &api_v1.Secret{ ObjectMeta: meta_v1.ObjectMeta{ @@ -2542,6 +2570,7 @@ func TestAddJWTSecrets(t *testing.T) { } func TestAddBasicSecrets(t *testing.T) { + t.Parallel() invalidErr := errors.New("invalid") validBasicSecret := &api_v1.Secret{ ObjectMeta: meta_v1.ObjectMeta{ @@ -2666,6 +2695,7 @@ func TestAddBasicSecrets(t *testing.T) { } func TestAddIngressMTLSSecret(t *testing.T) { + t.Parallel() invalidErr := errors.New("invalid") validSecret := &api_v1.Secret{ ObjectMeta: meta_v1.ObjectMeta{ @@ -2788,6 +2818,7 @@ func TestAddIngressMTLSSecret(t *testing.T) { } func TestAddEgressMTLSSecrets(t *testing.T) { + t.Parallel() invalidErr := errors.New("invalid") validMTLSSecret := &api_v1.Secret{ ObjectMeta: meta_v1.ObjectMeta{ @@ -3005,6 +3036,7 @@ func TestAddEgressMTLSSecrets(t *testing.T) { } func TestAddOidcSecret(t *testing.T) { + t.Parallel() invalidErr := errors.New("invalid") validSecret := &api_v1.Secret{ ObjectMeta: meta_v1.ObjectMeta{ @@ -3128,6 +3160,7 @@ func TestAddOidcSecret(t *testing.T) { } func TestAddWAFPolicyRefs(t *testing.T) { + t.Parallel() apPol := &unstructured.Unstructured{ Object: map[string]interface{}{ "metadata": map[string]interface{}{ @@ -3358,6 +3391,7 @@ func TestAddWAFPolicyRefs(t *testing.T) { } func TestGetWAFPoliciesForAppProtectPolicy(t *testing.T) { + t.Parallel() apPol := &conf_v1.Policy{ Spec: conf_v1.PolicySpec{ WAF: &conf_v1.WAF{ @@ -3435,6 +3469,7 @@ func TestGetWAFPoliciesForAppProtectPolicy(t *testing.T) { } func TestGetWAFPoliciesForAppProtectLogConf(t *testing.T) { + t.Parallel() logConf := &conf_v1.Policy{ Spec: conf_v1.PolicySpec{ WAF: &conf_v1.WAF{ @@ -3541,6 +3576,7 @@ func TestGetWAFPoliciesForAppProtectLogConf(t *testing.T) { } func TestPreSyncSecrets(t *testing.T) { + t.Parallel() secretLister := &cache.FakeCustomStore{ ListFunc: func() []interface{} { return []interface{}{ diff --git a/internal/k8s/handlers_test.go b/internal/k8s/handlers_test.go index eaed6eb2bc..ca80341cb8 100644 --- a/internal/k8s/handlers_test.go +++ b/internal/k8s/handlers_test.go @@ -10,6 +10,7 @@ import ( ) func TestHasServicePortChanges(t *testing.T) { + t.Parallel() cases := []struct { a []v1.ServicePort b []v1.ServicePort @@ -158,6 +159,7 @@ func TestHasServicePortChanges(t *testing.T) { } func TestAreResourcesDifferent(t *testing.T) { + t.Parallel() tests := []struct { oldR, newR *unstructured.Unstructured expected bool diff --git a/internal/k8s/reference_checkers_test.go b/internal/k8s/reference_checkers_test.go index 4548a54dc1..2262c47a86 100644 --- a/internal/k8s/reference_checkers_test.go +++ b/internal/k8s/reference_checkers_test.go @@ -11,6 +11,7 @@ import ( ) func TestSecretIsReferencedByIngress(t *testing.T) { + t.Parallel() tests := []struct { ing *networking.Ingress secretNamespace string @@ -149,6 +150,7 @@ func TestSecretIsReferencedByIngress(t *testing.T) { } func TestSecretIsReferencedByMinion(t *testing.T) { + t.Parallel() tests := []struct { ing *networking.Ingress secretNamespace string @@ -230,6 +232,7 @@ func TestSecretIsReferencedByMinion(t *testing.T) { } func TestSecretIsReferencedByVirtualServer(t *testing.T) { + t.Parallel() tests := []struct { vs *conf_v1.VirtualServer secretNamespace string @@ -299,6 +302,7 @@ func TestSecretIsReferencedByVirtualServer(t *testing.T) { } func TestSecretIsReferencedByVirtualServerRoute(t *testing.T) { + t.Parallel() isPlus := false // doesn't matter for VirtualServerRoute rc := newSecretReferenceChecker(isPlus) @@ -309,6 +313,7 @@ func TestSecretIsReferencedByVirtualServerRoute(t *testing.T) { } func TestSecretIsReferencedByTransportServer(t *testing.T) { + t.Parallel() isPlus := false // doesn't matter for TransportServer rc := newSecretReferenceChecker(isPlus) @@ -320,6 +325,7 @@ func TestSecretIsReferencedByTransportServer(t *testing.T) { } func TestServiceIsReferencedByIngressAndMinion(t *testing.T) { + t.Parallel() tests := []struct { ing *networking.Ingress serviceNamespace string @@ -454,6 +460,7 @@ func TestServiceIsReferencedByIngressAndMinion(t *testing.T) { } func TestServiceIsReferencedByVirtualServerAndVirtualServerRoutes(t *testing.T) { + t.Parallel() tests := []struct { vs *conf_v1.VirtualServer vsr *conf_v1.VirtualServerRoute @@ -570,6 +577,7 @@ func TestServiceIsReferencedByVirtualServerAndVirtualServerRoutes(t *testing.T) } func TestIsServiceReferencedByTransportServer(t *testing.T) { + t.Parallel() tests := []struct { ts *conf_v1alpha1.TransportServer serviceNamespace string @@ -644,25 +652,27 @@ func TestIsServiceReferencedByTransportServer(t *testing.T) { } func TestPolicyIsReferencedByIngressesAndTransportServers(t *testing.T) { + t.Parallel() rc := newPolicyReferenceChecker() result := rc.IsReferencedByIngress("", "", nil) - if result != false { + if result { t.Error("IsReferencedByIngress() returned true but expected false") } result = rc.IsReferencedByMinion("", "", nil) - if result != false { + if result { t.Error("IsReferencedByMinion() returned true but expected false") } result = rc.IsReferencedByTransportServer("", "", nil) - if result != false { + if result { t.Error("IsReferencedByTransportServer() returned true but expected false") } } func TestPolicyIsReferencedByVirtualServerAndVirtualServerRoute(t *testing.T) { + t.Parallel() tests := []struct { vs *conf_v1.VirtualServer vsr *conf_v1.VirtualServerRoute @@ -870,6 +880,7 @@ func TestPolicyIsReferencedByVirtualServerAndVirtualServerRoute(t *testing.T) { } func TestAppProtectResourceIsReferencedByIngresses(t *testing.T) { + t.Parallel() tests := []struct { ing *networking.Ingress resourceNamespace string @@ -1007,25 +1018,27 @@ func TestAppProtectResourceIsReferencedByIngresses(t *testing.T) { } func TestAppProtectResourceIsReferenced(t *testing.T) { + t.Parallel() rc := newAppProtectResourceReferenceChecker("test") result := rc.IsReferencedByVirtualServer("", "", nil) - if result != false { + if result { t.Error("IsReferencedByVirtualServer() returned true but expected false") } result = rc.IsReferencedByVirtualServerRoute("", "", nil) - if result != false { + if result { t.Error("IsReferencedByVirtualServer() returned true but expected false") } result = rc.IsReferencedByTransportServer("", "", nil) - if result != false { + if result { t.Error("IsReferencedByTransportServer() returned true but expected false") } } func TestIsPolicyIsReferenced(t *testing.T) { + t.Parallel() tests := []struct { policies []conf_v1.PolicyReference resourceNamespace string @@ -1096,6 +1109,7 @@ func TestIsPolicyIsReferenced(t *testing.T) { } func TestEndpointIsReferencedByVirtualServerAndVirtualServerRoutes(t *testing.T) { + t.Parallel() tests := []struct { vs *conf_v1.VirtualServer vsr *conf_v1.VirtualServerRoute @@ -1222,6 +1236,7 @@ func TestEndpointIsReferencedByVirtualServerAndVirtualServerRoutes(t *testing.T) } func TestDosProtectedIsReferencedByIngresses(t *testing.T) { + t.Parallel() tests := []struct { ing *networking.Ingress resourceNamespace string @@ -1359,6 +1374,7 @@ func TestDosProtectedIsReferencedByIngresses(t *testing.T) { } func TestDosProtectedIsReferencedByVirtualServer(t *testing.T) { + t.Parallel() tests := []struct { vs *conf_v1.VirtualServer protectedNamespace string diff --git a/internal/k8s/status_test.go b/internal/k8s/status_test.go index 9dd1c10cf2..39dbe906b0 100644 --- a/internal/k8s/status_test.go +++ b/internal/k8s/status_test.go @@ -19,6 +19,7 @@ import ( ) func TestUpdateTransportServerStatus(t *testing.T) { + t.Parallel() ts := &conf_v1alpha1.TransportServer{ ObjectMeta: meta_v1.ObjectMeta{ Name: "ts-1", @@ -70,6 +71,7 @@ func TestUpdateTransportServerStatus(t *testing.T) { } func TestUpdateTransportServerStatusIgnoreNoChange(t *testing.T) { + t.Parallel() ts := &conf_v1alpha1.TransportServer{ ObjectMeta: meta_v1.ObjectMeta{ Name: "ts-1", @@ -131,6 +133,7 @@ func TestUpdateTransportServerStatusIgnoreNoChange(t *testing.T) { } func TestUpdateTransportServerStatusMissingTransportServer(t *testing.T) { + t.Parallel() ts := &conf_v1alpha1.TransportServer{ ObjectMeta: meta_v1.ObjectMeta{ Name: "ts-1", @@ -187,6 +190,7 @@ func TestUpdateTransportServerStatusMissingTransportServer(t *testing.T) { } func TestStatusUpdateWithExternalStatusAndExternalService(t *testing.T) { + t.Parallel() ing := networking.Ingress{ ObjectMeta: meta_v1.ObjectMeta{ Name: "ing-1", @@ -293,6 +297,7 @@ func TestStatusUpdateWithExternalStatusAndExternalService(t *testing.T) { } func TestStatusUpdateWithExternalStatusAndIngressLink(t *testing.T) { + t.Parallel() ing := networking.Ingress{ ObjectMeta: meta_v1.ObjectMeta{ Name: "ing-1", @@ -403,6 +408,7 @@ func checkStatus(expected string, actual networking.Ingress) bool { } func TestGenerateExternalEndpointsFromStatus(t *testing.T) { + t.Parallel() tests := []struct { su statusUpdater expectedEndpoints []conf_v1.ExternalEndpoint @@ -443,6 +449,7 @@ func TestGenerateExternalEndpointsFromStatus(t *testing.T) { } func TestHasVsStatusChanged(t *testing.T) { + t.Parallel() state := "Valid" reason := "AddedOrUpdated" msg := "Configuration was added or updated" @@ -503,6 +510,7 @@ func TestHasVsStatusChanged(t *testing.T) { } func TestHasVsrStatusChanged(t *testing.T) { + t.Parallel() referencedBy := "namespace/name" state := "Valid" reason := "AddedOrUpdated" @@ -579,6 +587,7 @@ func TestHasVsrStatusChanged(t *testing.T) { } func TestGetExternalServicePorts(t *testing.T) { + t.Parallel() svc := v1.Service{ Spec: v1.ServiceSpec{ Ports: []v1.ServicePort{ @@ -609,6 +618,7 @@ func TestGetExternalServicePorts(t *testing.T) { } func TestIsRequiredPort(t *testing.T) { + t.Parallel() tests := []struct { port intstr.IntOrString expected bool @@ -667,6 +677,7 @@ func TestIsRequiredPort(t *testing.T) { } func TestHasPolicyStatusChanged(t *testing.T) { + t.Parallel() state := "Valid" reason := "AddedOrUpdated" msg := "Configuration was added or updated" diff --git a/internal/k8s/validation_test.go b/internal/k8s/validation_test.go index 4ffcbe0357..cc48a12d71 100644 --- a/internal/k8s/validation_test.go +++ b/internal/k8s/validation_test.go @@ -13,6 +13,7 @@ import ( ) func TestValidateIngress(t *testing.T) { + t.Parallel() tests := []struct { ing *networking.Ingress isPlus bool @@ -134,6 +135,7 @@ func TestValidateIngress(t *testing.T) { } func TestValidateNginxIngressAnnotations(t *testing.T) { + t.Parallel() tests := []struct { annotations map[string]string specServices map[string]bool @@ -2801,6 +2803,7 @@ func TestValidateNginxIngressAnnotations(t *testing.T) { } func TestValidateIngressSpec(t *testing.T) { + t.Parallel() tests := []struct { spec *networking.IngressSpec expectedErrors []field.ErrorType @@ -3059,6 +3062,7 @@ func TestValidateIngressSpec(t *testing.T) { } func TestValidateMasterSpec(t *testing.T) { + t.Parallel() tests := []struct { spec *networking.IngressSpec expectedErrors []string @@ -3130,6 +3134,7 @@ func TestValidateMasterSpec(t *testing.T) { } func TestValidateMinionSpec(t *testing.T) { + t.Parallel() tests := []struct { spec *networking.IngressSpec expectedErrors []string @@ -3268,6 +3273,7 @@ func errorListToTypes(list field.ErrorList) []field.ErrorType { } func TestGetSpecServices(t *testing.T) { + t.Parallel() tests := []struct { spec networking.IngressSpec expected map[string]bool