mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-05 02:09:56 +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 (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
|
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
|
||||||
@ -32,7 +31,7 @@ func TestClusterDNS(c *client.Client) bool {
|
|||||||
// https://github.com/GoogleCloudPlatform/kubernetes/issues/3305
|
// https://github.com/GoogleCloudPlatform/kubernetes/issues/3305
|
||||||
// (but even if it's fixed, this will need a version check for
|
// (but even if it's fixed, this will need a version check for
|
||||||
// skewed version tests)
|
// skewed version tests)
|
||||||
if os.Getenv("KUBERNETES_PROVIDER") == "gke" {
|
if testContext.provider == "gke" {
|
||||||
glog.Infof("skipping TestClusterDNS on gke")
|
glog.Infof("skipping TestClusterDNS on gke")
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,6 @@ limitations under the License.
|
|||||||
package e2e
|
package e2e
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"os"
|
|
||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@ -29,14 +28,11 @@ import (
|
|||||||
|
|
||||||
// TestKubeletSendsEvent checks that kubelets and scheduler send events about pods scheduling and running.
|
// TestKubeletSendsEvent checks that kubelets and scheduler send events about pods scheduling and running.
|
||||||
func TestKubeletSendsEvent(c *client.Client) bool {
|
func TestKubeletSendsEvent(c *client.Client) bool {
|
||||||
provider := os.Getenv("KUBERNETES_PROVIDER")
|
provider := testContext.provider
|
||||||
if len(provider) > 0 && provider != "gce" && provider != "gke" {
|
if len(provider) > 0 && provider != "gce" && provider != "gke" {
|
||||||
glog.Infof("skipping TestKubeletSendsEvent on cloud provider %s", provider)
|
glog.Infof("skipping TestKubeletSendsEvent on cloud provider %s", provider)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
if provider == "" {
|
|
||||||
glog.Info("KUBERNETES_PROVIDER is unset; assuming \"gce\"")
|
|
||||||
}
|
|
||||||
|
|
||||||
podClient := c.Pods(api.NamespaceDefault)
|
podClient := c.Pods(api.NamespaceDefault)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user