mirror of https://github.com/k3s-io/k3s
Merge pull request #4035 from brendandburns/webtest
Fix contrib webserver so that it compiles.pull/6/head
commit
4b0e4a111e
|
@ -206,7 +206,7 @@ func contactOthers(state *State) {
|
|||
Host: os.Getenv("KUBERNETES_RO_SERVICE_HOST") + ":" + os.Getenv("KUBERNETES_RO_SERVICE_PORT"),
|
||||
Path: "/api/v1beta1",
|
||||
}
|
||||
client := &client.Client{client.NewRESTClient(&masterRO, latest.Codec)}
|
||||
client := &client.Client{client.NewRESTClient(&masterRO, "v1beta1", latest.Codec, true)}
|
||||
|
||||
// Do this repeatedly, in case there's some propagation delay with getting
|
||||
// newly started pods into the endpoints list.
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue