Fix contrib webserver so that it compiles.

This commit is contained in:
Brendan Burns
2015-02-02 14:58:44 -08:00
parent ac2f435aca
commit 8bce2ef61c
2 changed files with 13 additions and 1 deletions

View File

@@ -17,6 +17,7 @@ limitations under the License.
package e2e
import (
"net/http"
"time"
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
@@ -34,6 +35,17 @@ func TestNetwork(c *client.Client) bool {
return true
}
// Test basic external connectivity.
resp, err := http.Get("http://google.com/")
if err != nil {
glog.Errorf("unable to talk to the external internet: %v", err)
return false
}
if resp.StatusCode != http.StatusOK {
glog.Errorf("unexpected error code. expected 200, got: %v (%v)", resp.StatusCode, resp)
return false
}
ns := api.NamespaceDefault
// TODO(satnam6502): Replace call of randomSuffix with call to NewUUID when service
// names have the same form as pod and replication controller names.