Remove use of KUBERNETES_PROVIDER env var from Go end to end tests

This commit is contained in:
Satnam Singh 2015-01-22 11:56:13 -08:00
parent bc01148286
commit 1bae69a9c4
2 changed files with 2 additions and 7 deletions

View File

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

View File

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