Populate endpoints and allow ports with headless service
This commit is contained in:
@@ -9463,6 +9463,14 @@ func TestValidateEndpoints(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
"empty ports": {
|
||||
ObjectMeta: metav1.ObjectMeta{Name: "mysvc", Namespace: "namespace"},
|
||||
Subsets: []api.EndpointSubset{
|
||||
{
|
||||
Addresses: []api.EndpointAddress{{IP: "10.10.3.3"}},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
for k, v := range successCases {
|
||||
@@ -9505,17 +9513,6 @@ func TestValidateEndpoints(t *testing.T) {
|
||||
},
|
||||
errorType: "FieldValueRequired",
|
||||
},
|
||||
"empty ports": {
|
||||
endpoints: api.Endpoints{
|
||||
ObjectMeta: metav1.ObjectMeta{Name: "mysvc", Namespace: "namespace"},
|
||||
Subsets: []api.EndpointSubset{
|
||||
{
|
||||
Addresses: []api.EndpointAddress{{IP: "10.10.3.3"}},
|
||||
},
|
||||
},
|
||||
},
|
||||
errorType: "FieldValueRequired",
|
||||
},
|
||||
"invalid IP": {
|
||||
endpoints: api.Endpoints{
|
||||
ObjectMeta: metav1.ObjectMeta{Name: "mysvc", Namespace: "namespace"},
|
||||
|
Reference in New Issue
Block a user