Skip GET test for basic.go when no hostIP

This commit is contained in:
Satnam Singh
2015-01-16 10:04:10 -08:00
parent 39c917b068
commit 8b68d7ee2d

View File

@@ -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)