mirror of https://github.com/k3s-io/k3s
Fix influxdb e2e test failure.
In scalability testing influxdb was recently disabled, but we still trying to execute corresponidng test, as a result it fails all the time. Skip test if influxdb is disabled.pull/6/head
parent
d215d4bf8c
commit
ba313796f1
|
@ -148,6 +148,7 @@ export PATH=$(dirname "${e2e_test}"):"${PATH}"
|
|||
--network="${KUBE_GCE_NETWORK:-${KUBE_GKE_NETWORK:-e2e}}" \
|
||||
--node-tag="${NODE_TAG:-}" \
|
||||
--master-tag="${MASTER_TAG:-}" \
|
||||
--cluster-monitoring-mode="${KUBE_ENABLE_CLUSTER_MONITORING:-influxdb}" \
|
||||
${KUBE_CONTAINER_RUNTIME:+"--container-runtime=${KUBE_CONTAINER_RUNTIME}"} \
|
||||
${MASTER_OS_DISTRIBUTION:+"--master-os-distro=${MASTER_OS_DISTRIBUTION}"} \
|
||||
${NODE_OS_DISTRIBUTION:+"--node-os-distro=${NODE_OS_DISTRIBUTION}"} \
|
||||
|
|
|
@ -102,6 +102,8 @@ type TestContextType struct {
|
|||
FeatureGates string
|
||||
// Node e2e specific test context
|
||||
NodeTestContextType
|
||||
// Monitoring solution that is used in current cluster.
|
||||
ClusterMonitoringMode string
|
||||
|
||||
// Indicates what path the kubernetes-anywhere is installed on
|
||||
KubernetesAnywherePath string
|
||||
|
@ -221,6 +223,7 @@ func RegisterClusterFlags() {
|
|||
flag.StringVar(&TestContext.Prefix, "prefix", "e2e", "A prefix to be added to cloud resources created during testing.")
|
||||
flag.StringVar(&TestContext.MasterOSDistro, "master-os-distro", "debian", "The OS distribution of cluster master (debian, trusty, or coreos).")
|
||||
flag.StringVar(&TestContext.NodeOSDistro, "node-os-distro", "debian", "The OS distribution of cluster VM instances (debian, trusty, or coreos).")
|
||||
flag.StringVar(&TestContext.ClusterMonitoringMode, "cluster-monitoring-mode", "influxdb", "The monitoring solution that is used in the cluster.")
|
||||
|
||||
// TODO: Flags per provider? Rename gce-project/gce-zone?
|
||||
cloudConfig := &TestContext.CloudConfig
|
||||
|
|
|
@ -331,6 +331,12 @@ func SkipUnlessProviderIs(supportedProviders ...string) {
|
|||
}
|
||||
}
|
||||
|
||||
func SkipUnlessClusterMonitoringModeIs(supportedMonitoring ...string) {
|
||||
if !ClusterMonitoringModeIs(supportedMonitoring...) {
|
||||
Skipf("Only next monitoring modes are supported %v (not %s)", supportedMonitoring, TestContext.ClusterMonitoringMode)
|
||||
}
|
||||
}
|
||||
|
||||
func SkipUnlessMasterOSDistroIs(supportedMasterOsDistros ...string) {
|
||||
if !MasterOSDistroIs(supportedMasterOsDistros...) {
|
||||
Skipf("Only supported for master OS distro %v (not %s)", supportedMasterOsDistros, TestContext.MasterOSDistro)
|
||||
|
@ -378,6 +384,15 @@ func ProviderIs(providers ...string) bool {
|
|||
return false
|
||||
}
|
||||
|
||||
func ClusterMonitoringModeIs(monitoringModes ...string) bool {
|
||||
for _, mode := range monitoringModes {
|
||||
if strings.ToLower(mode) == strings.ToLower(TestContext.ClusterMonitoringMode) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func MasterOSDistroIs(supportedMasterOsDistros ...string) bool {
|
||||
for _, distro := range supportedMasterOsDistros {
|
||||
if strings.ToLower(distro) == strings.ToLower(TestContext.MasterOSDistro) {
|
||||
|
|
|
@ -39,6 +39,7 @@ var _ = instrumentation.SIGDescribe("Monitoring", func() {
|
|||
|
||||
BeforeEach(func() {
|
||||
framework.SkipUnlessProviderIs("gce")
|
||||
framework.SkipUnlessClusterMonitoringModeIs("influxdb")
|
||||
})
|
||||
|
||||
It("should verify monitoring pods and all cluster nodes are available on influxdb using heapster.", func() {
|
||||
|
|
Loading…
Reference in New Issue