Merge pull request #12410 from mesosphere/non-unique-endpoint-ip-no-port-names

Fix e2e endpoints tests on Mesos
This commit is contained in:
Alex Robinson
2015-08-10 09:49:55 -07:00
4 changed files with 93 additions and 52 deletions

View File

@@ -348,12 +348,15 @@ var _ = Describe("Kubectl client", func() {
endpoints, err := c.Endpoints(ns).Get(name)
Expect(err).NotTo(HaveOccurred())
ipToPort := getPortsByIp(endpoints.Subsets)
if len(ipToPort) != 1 {
Logf("No IP found, retrying")
uidToPort := getContainerPortsByPodUID(endpoints)
if len(uidToPort) == 0 {
Logf("No endpoint found, retrying")
continue
}
for _, port := range ipToPort {
if len(uidToPort) > 1 {
Fail("To many endpoints found")
}
for _, port := range uidToPort {
if port[0] != redisPort {
Failf("Wrong endpoint port: %d", port[0])
}