Fix bug for headless services without ports

This commit is contained in:
Zihong Zheng
2018-04-12 15:42:26 -07:00
parent 9816b43188
commit 36f9bc085d
2 changed files with 12 additions and 8 deletions

View File

@@ -753,7 +753,7 @@ func TestSyncEndpointsHeadlessService(t *testing.T) {
},
Subsets: []v1.EndpointSubset{{
Addresses: []v1.EndpointAddress{{IP: "1.2.3.4", NodeName: &emptyNodeName, TargetRef: &v1.ObjectReference{Kind: "Pod", Name: "pod0", Namespace: ns}}},
Ports: []v1.EndpointPort{{Port: 0, Protocol: "TCP"}},
Ports: []v1.EndpointPort{},
}},
})
endpointsHandler.ValidateRequestCount(t, 1)