mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 07:20:13 +00:00
Remove use of KUBERNETES_PROVIDER env var from Go end to end tests
This commit is contained in:
parent
bc01148286
commit
1bae69a9c4
@ -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
|
||||
}
|
||||
|
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user