also remove slow tag from resizing tests

This commit is contained in:
Hemant Kumar 2019-02-07 12:30:52 -05:00
parent e3faa003a1
commit 7d823e5df0
4 changed files with 12 additions and 11 deletions

View File

@ -368,7 +368,7 @@ if [[ -n "${GCE_GLBC_IMAGE:-}" ]]; then
fi
if [[ -z "${KUBE_ADMISSION_CONTROL:-}" ]]; then
ADMISSION_CONTROL="NamespaceLifecycle,LimitRanger,ServiceAccount,PersistentVolumeLabel,PodPreset,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,Priority,StorageObjectInUseProtection"
ADMISSION_CONTROL="NamespaceLifecycle,LimitRanger,ServiceAccount,PersistentVolumeLabel,PodPreset,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,Priority,StorageObjectInUseProtection,PersistentVolumeClaimResize"
if [[ "${ENABLE_POD_SECURITY_POLICY:-}" == "true" ]]; then
ADMISSION_CONTROL="${ADMISSION_CONTROL},PodSecurityPolicy"
fi

View File

@ -35,7 +35,7 @@ import (
"k8s.io/kubernetes/test/e2e/storage/utils"
)
var _ = utils.SIGDescribe("Mounted volume expand[Slow]", func() {
var _ = utils.SIGDescribe("Mounted volume expand", func() {
var (
c clientset.Interface
ns string

View File

@ -40,7 +40,7 @@ const (
totalResizeWaitPeriod = 20 * time.Minute
)
var _ = utils.SIGDescribe("Volume expand [Slow]", func() {
var _ = utils.SIGDescribe("Volume expand", func() {
var (
c clientset.Interface
ns string
@ -80,7 +80,6 @@ var _ = utils.SIGDescribe("Volume expand [Slow]", func() {
test := testsuites.StorageClassTest{
Name: "no-expansion",
ClaimSize: "2Gi",
AllowVolumeExpansion: false,
}
regularSC, err := createStorageClass(test, ns, "noexpand", c)
Expect(err).NotTo(HaveOccurred(), "Error creating non-expandable storage class")
@ -88,9 +87,7 @@ var _ = utils.SIGDescribe("Volume expand [Slow]", func() {
defer func() {
framework.ExpectNoError(c.StorageV1().StorageClasses().Delete(regularSC.Name, nil))
}()
Expect(regularSC.AllowVolumeExpansion).NotTo(BeNil())
Expect(*resizableSc.AllowVolumeExpansion).To(BeFalse())
Expect(regularSC.AllowVolumeExpansion).To(BeNil())
noExpandPVC := newClaim(test, ns, "noexpand")
noExpandPVC.Spec.StorageClassName = &regularSC.Name
@ -108,7 +105,7 @@ var _ = utils.SIGDescribe("Volume expand [Slow]", func() {
By("Expanding non-expandable pvc")
newSize := resource.MustParse("6Gi")
pvc, err = expandPVCSize(noExpandPVC, newSize, c)
noExpandPVC, err = expandPVCSize(noExpandPVC, newSize, c)
Expect(err).To(HaveOccurred(), "While updating non-expandable PVC")
})

View File

@ -1063,7 +1063,11 @@ func newStorageClass(t testsuites.StorageClassTest, ns string, suffix string) *s
if t.DelayBinding {
bindingMode = storage.VolumeBindingWaitForFirstConsumer
}
return getStorageClass(pluginName, t.Parameters, &bindingMode, ns, suffix)
sc := getStorageClass(pluginName, t.Parameters, &bindingMode, ns, suffix)
if t.AllowVolumeExpansion {
sc.AllowVolumeExpansion = &t.AllowVolumeExpansion
}
return sc
}
func getStorageClass(