Revert "Multi-port Endpoints"

This commit is contained in:
Daniel Smith
2015-02-23 13:53:21 -08:00
parent eed36455a7
commit 650f6cb826
52 changed files with 525 additions and 938 deletions

View File

@@ -250,11 +250,8 @@ var _ = Describe("Services", func() {
func validateIPsOrFail(c *client.Client, ns string, expectedPort int, expectedEndpoints []string, endpoints *api.Endpoints) {
ips := util.StringSet{}
for _, ep := range endpoints.Endpoints {
if len(ep.Ports) == 0 {
Fail(fmt.Sprintf("invalid endpoint, no ports"))
}
if ep.Ports[0].Port != expectedPort {
Fail(fmt.Sprintf("invalid port, expected %d, got %d", expectedPort, ep.Ports[0].Port))
if ep.Port != expectedPort {
Fail(fmt.Sprintf("invalid port, expected %d, got %d", expectedPort, ep.Port))
}
ips.Insert(ep.IP)
}
@@ -299,7 +296,7 @@ func addEndpointPodOrFail(c *client.Client, ns, name string, labels map[string]s
{
Name: "test",
Image: "kubernetes/pause",
Ports: []api.ContainerPort{{ContainerPort: 80}},
Ports: []api.Port{{ContainerPort: 80}},
},
},
},