Version gates the ephemeral storage e2e test

pull/6/head
Timothy St. Clair 2017-09-08 16:30:31 -05:00
parent 5006426022
commit 79725246f4
2 changed files with 7 additions and 0 deletions

View File

@ -23,6 +23,7 @@ go_library(
"//pkg/api/v1/helper:go_default_library",
"//pkg/api/v1/pod:go_default_library",
"//pkg/util/system:go_default_library",
"//pkg/util/version:go_default_library",
"//plugin/pkg/scheduler/algorithm/priorities/util:go_default_library",
"//test/e2e/common:go_default_library",
"//test/e2e/framework:go_default_library",

View File

@ -28,6 +28,7 @@ import (
"k8s.io/apimachinery/pkg/util/sets"
"k8s.io/apimachinery/pkg/util/uuid"
clientset "k8s.io/client-go/kubernetes"
utilversion "k8s.io/kubernetes/pkg/util/version"
"k8s.io/kubernetes/test/e2e/common"
"k8s.io/kubernetes/test/e2e/framework"
testutils "k8s.io/kubernetes/test/utils"
@ -40,6 +41,8 @@ import (
const maxNumberOfPods int64 = 10
const minPodCPURequest int64 = 500
var localStorageVersion = utilversion.MustParseSemantic("v1.8.0-beta.0")
// variable set in BeforeEach, never modified afterwards
var masterNodes sets.String
@ -152,6 +155,9 @@ var _ = SIGDescribe("SchedulerPredicates [Serial]", func() {
// It assumes that cluster add-on pods stay stable and cannot be run in parallel with any other test that touches Nodes or Pods.
// It is so because we need to have precise control on what's running in the cluster.
It("validates local ephemeral storage resource limits of pods that are allowed to run [Feature:LocalStorageCapacityIsolation]", func() {
framework.SkipUnlessServerVersionGTE(localStorageVersion, f.ClientSet.Discovery())
nodeMaxAllocatable := int64(0)
nodeToAllocatableMap := make(map[string]int64)