// Assert basic external connectivity. // Since this is not really a test of kubernetes in any way, we // leave it as a pre-test assertion, rather than a Ginko test. By("Executing a successful http request from the external internet") resp, err := http.Get("http://google.com") if err != nil { framework.Failf("Unable to connect/talk to the internet: %v", err) } if resp.StatusCode != http.StatusOK { framework.Failf("Unexpected error code, expected 200, got, %v (%v)", resp.StatusCode, resp) } }) It("should provide Internet connection for containers [Conformance]", func() { By("Running container which tries to wget google.com") framework.ExpectNoError(framework.CheckConnectivityToHost(f, "", "wget-test", "google.com", 30)) }) // First test because it has no dependencies on variables created later on. It("should provide unchanging, static URL paths for kubernetes api services [Conformance]", func() { tests := []struct { path string }{ {path: "/healthz"}, {path: "/api"}, {path: "/apis"}, {path: "/logs"}, {path: "/metrics"}, {path: "/swaggerapi"}, {path: "/version"}, // TODO: test proxy links here
//Assert basic external connectivity. //Since this is not really a test of kubernetes in any way, we //leave it as a pre-test assertion, rather than a Ginko test. By("Executing a successful http request from the external internet") resp, err := http.Get("http://google.com") if err != nil { framework.Failf("Unable to connect/talk to the internet: %v", err) } if resp.StatusCode != http.StatusOK { framework.Failf("Unexpected error code, expected 200, got, %v (%v)", resp.StatusCode, resp) } }) It("should provide Internet connection for containers [Conformance]", func() { By("Running container which tries to wget google.com") framework.ExpectNoError(framework.CheckConnectivityToHost(f, "", "wget-test", "google.com", 30)) }) // First test because it has no dependencies on variables created later on. It("should provide unchanging, static URL paths for kubernetes api services [Conformance]", func() { tests := []struct { path string }{ {path: "/healthz"}, {path: "/api"}, {path: "/apis"}, {path: "/logs"}, {path: "/metrics"}, {path: "/swaggerapi"}, {path: "/version"}, // TODO: test proxy links here