From 8b68d7ee2d57f9fa06910410a9e45d94739f1cbe Mon Sep 17 00:00:00 2001 From: Satnam Singh Date: Fri, 16 Jan 2015 10:04:10 -0800 Subject: [PATCH] Skip GET test for basic.go when no hostIP --- test/e2e/basic.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/e2e/basic.go b/test/e2e/basic.go index 221cac86aaa..703bb7ca13b 100644 --- a/test/e2e/basic.go +++ b/test/e2e/basic.go @@ -122,7 +122,11 @@ func TestBasicImage(c *client.Client, image string) bool { // Verify that something is listening. for i, pod := range pods.Items { - glog.Infof("Pod %s hostIP %s", pod.Name, pod.Status.HostIP) + glog.Infof("Pod: %s hostIP: %s", pod.Name, pod.Status.HostIP) + if pod.Status.HostIP == "" { + glog.Warningf("Skipping test of GET response since hostIP is not available") + continue + } resp, err := http.Get(fmt.Sprintf("http://%s:8080", pod.Status.HostIP)) if err != nil { glog.Errorf("Failed to GET from replica %d: %v", i+1, err)