From 1bae69a9c40859389f6db6b9f2f37884f306d215 Mon Sep 17 00:00:00 2001 From: Satnam Singh Date: Thu, 22 Jan 2015 11:56:13 -0800 Subject: [PATCH] Remove use of KUBERNETES_PROVIDER env var from Go end to end tests --- test/e2e/cluster_dns.go | 3 +-- test/e2e/kubelet_sends_events.go | 6 +----- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/test/e2e/cluster_dns.go b/test/e2e/cluster_dns.go index cbd1d3a7c01a3..b2ddc674e6d13 100644 --- a/test/e2e/cluster_dns.go +++ b/test/e2e/cluster_dns.go @@ -18,7 +18,6 @@ package e2e import ( "fmt" - "os" "time" "github.com/GoogleCloudPlatform/kubernetes/pkg/api" @@ -32,7 +31,7 @@ func TestClusterDNS(c *client.Client) bool { // https://github.com/GoogleCloudPlatform/kubernetes/issues/3305 // (but even if it's fixed, this will need a version check for // skewed version tests) - if os.Getenv("KUBERNETES_PROVIDER") == "gke" { + if testContext.provider == "gke" { glog.Infof("skipping TestClusterDNS on gke") return true } diff --git a/test/e2e/kubelet_sends_events.go b/test/e2e/kubelet_sends_events.go index 7ee662c89fcee..d1f1341edaac3 100644 --- a/test/e2e/kubelet_sends_events.go +++ b/test/e2e/kubelet_sends_events.go @@ -17,7 +17,6 @@ limitations under the License. package e2e import ( - "os" "strconv" "time" @@ -29,14 +28,11 @@ import ( // TestKubeletSendsEvent checks that kubelets and scheduler send events about pods scheduling and running. func TestKubeletSendsEvent(c *client.Client) bool { - provider := os.Getenv("KUBERNETES_PROVIDER") + provider := testContext.provider if len(provider) > 0 && provider != "gce" && provider != "gke" { glog.Infof("skipping TestKubeletSendsEvent on cloud provider %s", provider) return true } - if provider == "" { - glog.Info("KUBERNETES_PROVIDER is unset; assuming \"gce\"") - } podClient := c.Pods(api.NamespaceDefault)