Skip to content

Commit 45f5ecf

Browse files
authored
Merge pull request kubernetes#125452 from carlory/clean-e2efeatures
remove unneeded e2e features
2 parents 0446f6c + 3e70a1b commit 45f5ecf

File tree

5 files changed

+31
-43
lines changed

5 files changed

+31
-43
lines changed

test/e2e/apimachinery/resource_quota.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1274,7 +1274,7 @@ var _ = SIGDescribe("ResourceQuota", func() {
12741274
})
12751275
})
12761276

1277-
var _ = SIGDescribe("ResourceQuota", feature.VolumeAttributesClass, framework.WithFeatureGate(features.VolumeAttributesClass), func() {
1277+
var _ = SIGDescribe("ResourceQuota", framework.WithFeatureGate(features.VolumeAttributesClass), func() {
12781278
f := framework.NewDefaultFramework("resourcequota-volumeattributesclass")
12791279
f.NamespacePodSecurityLevel = admissionapi.LevelBaseline
12801280

test/e2e/feature/feature.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -528,13 +528,6 @@ var (
528528
// TODO: document the feature (owning SIG, when to use this feature for a test)
529529
ValidatingAdmissionPolicy = framework.WithFeature(framework.ValidFeatures.Add("ValidatingAdmissionPolicy"))
530530

531-
// Owner: sig-storage
532-
// Tests related to VolumeAttributesClass (https://kep.k8s.io/3751)
533-
//
534-
// TODO: This label only requires the API storage.k8s.io/v1alpha1 and the VolumeAttributesClass feature-gate enabled.
535-
// It should be removed after k/k #124350 is merged.
536-
VolumeAttributesClass = framework.WithFeature(framework.ValidFeatures.Add("VolumeAttributesClass"))
537-
538531
// TODO: document the feature (owning SIG, when to use this feature for a test)
539532
Volumes = framework.WithFeature(framework.ValidFeatures.Add("Volumes"))
540533

test/e2e/storage/testsuites/volume_modify.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ import (
3030
"k8s.io/apimachinery/pkg/util/errors"
3131
clientset "k8s.io/client-go/kubernetes"
3232
"k8s.io/kubernetes/pkg/features"
33-
e2efeature "k8s.io/kubernetes/test/e2e/feature"
3433
"k8s.io/kubernetes/test/e2e/framework"
3534
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
3635
e2epv "k8s.io/kubernetes/test/e2e/framework/pv"
@@ -61,7 +60,7 @@ func InitCustomVolumeModifyTestSuite(patterns []storageframework.TestPattern) st
6160
SupportedSizeRange: e2evolume.SizeRange{
6261
Min: "1Gi",
6362
},
64-
TestTags: []interface{}{e2efeature.VolumeAttributesClass, framework.WithFeatureGate(features.VolumeAttributesClass)},
63+
TestTags: []interface{}{framework.WithFeatureGate(features.VolumeAttributesClass)},
6564
},
6665
}
6766
}

test/e2e/storage/volume_metrics.go

Lines changed: 28 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ import (
3434
"k8s.io/component-helpers/storage/ephemeral"
3535
"k8s.io/kubernetes/pkg/features"
3636
kubeletmetrics "k8s.io/kubernetes/pkg/kubelet/metrics"
37-
"k8s.io/kubernetes/test/e2e/feature"
3837
"k8s.io/kubernetes/test/e2e/framework"
3938
e2emetrics "k8s.io/kubernetes/test/e2e/framework/metrics"
4039
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
@@ -626,38 +625,36 @@ var _ = utils.SIGDescribe(framework.WithSerial(), "Volume metrics", func() {
626625
})
627626

628627
// TODO: Merge with bound/unbound tests when "VolumeAttributesClass" feature is enabled by default
629-
f.It("should create unbound pvc count metrics for pvc controller with volume attributes class dimension after creating pvc only",
630-
feature.VolumeAttributesClass, framework.WithFeatureGate(features.VolumeAttributesClass), func(ctx context.Context) {
631-
var err error
632-
dimensions := []string{namespaceKey, storageClassKey, volumeAttributeClassKey}
633-
pvcConfigWithVAC := pvcConfig
634-
pvcConfigWithVAC.VolumeAttributesClassName = &volumeAttributesClassName
635-
pvcWithVAC := e2epv.MakePersistentVolumeClaim(pvcConfigWithVAC, ns)
636-
pvc, err = e2epv.CreatePVC(ctx, c, ns, pvcWithVAC)
637-
framework.ExpectNoError(err, "Error creating pvc: %v", err)
638-
waitForPVControllerSync(ctx, metricsGrabber, unboundPVCKey, volumeAttributeClassKey)
639-
controllerMetrics, err := metricsGrabber.GrabFromControllerManager(ctx)
640-
framework.ExpectNoError(err, "Error getting c-m metricValues: %v", err)
641-
err = testutil.ValidateMetrics(testutil.Metrics(controllerMetrics), unboundPVCKey, dimensions...)
642-
framework.ExpectNoError(err, "Invalid metric in Controller Manager metrics: %q", unboundPVCKey)
643-
})
628+
f.It("should create unbound pvc count metrics for pvc controller with volume attributes class dimension after creating pvc only", framework.WithFeatureGate(features.VolumeAttributesClass), func(ctx context.Context) {
629+
var err error
630+
dimensions := []string{namespaceKey, storageClassKey, volumeAttributeClassKey}
631+
pvcConfigWithVAC := pvcConfig
632+
pvcConfigWithVAC.VolumeAttributesClassName = &volumeAttributesClassName
633+
pvcWithVAC := e2epv.MakePersistentVolumeClaim(pvcConfigWithVAC, ns)
634+
pvc, err = e2epv.CreatePVC(ctx, c, ns, pvcWithVAC)
635+
framework.ExpectNoError(err, "Error creating pvc: %v", err)
636+
waitForPVControllerSync(ctx, metricsGrabber, unboundPVCKey, volumeAttributeClassKey)
637+
controllerMetrics, err := metricsGrabber.GrabFromControllerManager(ctx)
638+
framework.ExpectNoError(err, "Error getting c-m metricValues: %v", err)
639+
err = testutil.ValidateMetrics(testutil.Metrics(controllerMetrics), unboundPVCKey, dimensions...)
640+
framework.ExpectNoError(err, "Invalid metric in Controller Manager metrics: %q", unboundPVCKey)
641+
})
644642

645643
// TODO: Merge with bound/unbound tests when "VolumeAttributesClass" feature is enabled by default
646-
f.It("should create bound pv/pvc count metrics for pvc controller with volume attributes class dimension after creating both pv and pvc",
647-
feature.VolumeAttributesClass, framework.WithFeatureGate(features.VolumeAttributesClass), func(ctx context.Context) {
648-
var err error
649-
dimensions := []string{namespaceKey, storageClassKey, volumeAttributeClassKey}
650-
pvcConfigWithVAC := pvcConfig
651-
pvcConfigWithVAC.VolumeAttributesClassName = &volumeAttributesClassName
652-
pv, pvc, err = e2epv.CreatePVPVC(ctx, c, f.Timeouts, pvConfig, pvcConfigWithVAC, ns, true)
653-
framework.ExpectNoError(err, "Error creating pv pvc: %v", err)
654-
waitForPVControllerSync(ctx, metricsGrabber, boundPVKey, storageClassKey)
655-
waitForPVControllerSync(ctx, metricsGrabber, boundPVCKey, volumeAttributeClassKey)
656-
controllerMetrics, err := metricsGrabber.GrabFromControllerManager(ctx)
657-
framework.ExpectNoError(err, "Error getting c-m metricValues: %v", err)
658-
err = testutil.ValidateMetrics(testutil.Metrics(controllerMetrics), boundPVCKey, dimensions...)
659-
framework.ExpectNoError(err, "Invalid metric in Controller Manager metrics: %q", boundPVCKey)
660-
})
644+
f.It("should create bound pv/pvc count metrics for pvc controller with volume attributes class dimension after creating both pv and pvc", framework.WithFeatureGate(features.VolumeAttributesClass), func(ctx context.Context) {
645+
var err error
646+
dimensions := []string{namespaceKey, storageClassKey, volumeAttributeClassKey}
647+
pvcConfigWithVAC := pvcConfig
648+
pvcConfigWithVAC.VolumeAttributesClassName = &volumeAttributesClassName
649+
pv, pvc, err = e2epv.CreatePVPVC(ctx, c, f.Timeouts, pvConfig, pvcConfigWithVAC, ns, true)
650+
framework.ExpectNoError(err, "Error creating pv pvc: %v", err)
651+
waitForPVControllerSync(ctx, metricsGrabber, boundPVKey, storageClassKey)
652+
waitForPVControllerSync(ctx, metricsGrabber, boundPVCKey, volumeAttributeClassKey)
653+
controllerMetrics, err := metricsGrabber.GrabFromControllerManager(ctx)
654+
framework.ExpectNoError(err, "Error getting c-m metricValues: %v", err)
655+
err = testutil.ValidateMetrics(testutil.Metrics(controllerMetrics), boundPVCKey, dimensions...)
656+
framework.ExpectNoError(err, "Invalid metric in Controller Manager metrics: %q", boundPVCKey)
657+
})
661658

662659
ginkgo.It("should create total pv count metrics for with plugin and volume mode labels after creating pv",
663660
func(ctx context.Context) {

test/e2e/storage/volumeattributesclass.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import (
2727
types "k8s.io/apimachinery/pkg/types"
2828
"k8s.io/client-go/util/retry"
2929
"k8s.io/kubernetes/pkg/features"
30-
"k8s.io/kubernetes/test/e2e/feature"
3130
"k8s.io/kubernetes/test/e2e/framework"
3231
"k8s.io/kubernetes/test/e2e/storage/utils"
3332
admissionapi "k8s.io/pod-security-admission/api"
@@ -36,7 +35,7 @@ import (
3635
"github.com/onsi/gomega"
3736
)
3837

39-
var _ = utils.SIGDescribe("VolumeAttributesClass", feature.VolumeAttributesClass, framework.WithFeatureGate(features.VolumeAttributesClass), func() {
38+
var _ = utils.SIGDescribe("VolumeAttributesClass", framework.WithFeatureGate(features.VolumeAttributesClass), func() {
4039

4140
f := framework.NewDefaultFramework("csi-volumeattributesclass")
4241
f.NamespacePodSecurityLevel = admissionapi.LevelBaseline

0 commit comments

Comments
 (0)