Remove bad test for AllocateLoadBalancerNodePorts

If the gate is open, we should never find nil.
This commit is contained in:
Tim Hockin 2021-06-27 15:56:11 -07:00
parent 0bb280044e
commit 292b1444eb

View File

@ -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{