From 292b1444ebfb5e91b8ed5c06e56044a8f4d41017 Mon Sep 17 00:00:00 2001 From: Tim Hockin Date: Sun, 27 Jun 2021 15:56:11 -0700 Subject: [PATCH] Remove bad test for AllocateLoadBalancerNodePorts If the gate is open, we should never find nil. --- .../core/service/storage/rest_test.go | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/pkg/registry/core/service/storage/rest_test.go b/pkg/registry/core/service/storage/rest_test.go index cff1830607a..d320ac2a3fe 100644 --- a/pkg/registry/core/service/storage/rest_test.go +++ b/pkg/registry/core/service/storage/rest_test.go @@ -1168,26 +1168,6 @@ func TestAllocateLoadBalancerNodePorts(t *testing.T) { allocateNodePortGate bool expectError bool }{ - { - name: "allocate nil, gate on", - svc: &api.Service{ - ObjectMeta: metav1.ObjectMeta{Name: "alloc-nil"}, - Spec: api.ServiceSpec{ - AllocateLoadBalancerNodePorts: nil, - Selector: map[string]string{"bar": "baz"}, - SessionAffinity: api.ServiceAffinityNone, - Type: api.ServiceTypeLoadBalancer, - Ports: []api.ServicePort{{ - Port: 6502, - Protocol: api.ProtocolTCP, - TargetPort: intstr.FromInt(6502), - }}, - }, - }, - expectNodePorts: true, - allocateNodePortGate: true, - expectError: true, - }, { name: "allocate false, gate on", svc: &api.Service{