Merge pull request #32340 from lavalamp/serveralloctest

Automatic merge from submit-queue

add more details to TestServiceAlloc failure

To debug #32028
pull/6/head
Kubernetes Submit Queue 2016-09-09 01:37:45 -07:00 committed by GitHub
commit 95771b12e9
1 changed files with 9 additions and 1 deletions

View File

@ -465,7 +465,15 @@ func TestServiceAlloc(t *testing.T) {
t.Errorf("unexpected error text: %v", err)
}
} else {
t.Fatalf("unexpected sucess")
svcs, err := client.Services(api.NamespaceAll).List(api.ListOptions{})
if err != nil {
t.Fatalf("unexpected success, and error getting the services: %v", err)
}
allIPs := []string{}
for _, s := range svcs.Items {
allIPs = append(allIPs, s.Spec.ClusterIP)
}
t.Fatalf("unexpected creation success. The following IPs exist: %#v. It should only be possible to allocate 2 IP addresses in this cluster.\n\n%#v", allIPs, svcs)
}
// Delete the first service.