mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-07-19 07:25:19 +00:00
Replace feature label with WithFeatureGate for KubeletPSI test
- Remove feature.KubeletPSI label as it may be redundant for categorization - Add framework.WithFeatureGate(features.KubeletPSI) for proper feature gate checking - Remove redundant utilfeature.DefaultFeatureGate.Enabled check in BeforeEach This addresses the cleanup goal in issue #134172 to replace feature labels with feature gates where appropriate.
This commit is contained in:
@@ -30,7 +30,6 @@ import (
|
||||
utilfeature "k8s.io/apiserver/pkg/util/feature"
|
||||
kubeletstatsv1alpha1 "k8s.io/kubelet/pkg/apis/stats/v1alpha1"
|
||||
"k8s.io/kubernetes/pkg/features"
|
||||
"k8s.io/kubernetes/test/e2e/feature"
|
||||
"k8s.io/kubernetes/test/e2e/framework"
|
||||
e2ekubectl "k8s.io/kubernetes/test/e2e/framework/kubectl"
|
||||
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
|
||||
@@ -368,11 +367,8 @@ var _ = SIGDescribe("Summary API", framework.WithNodeConformance(), func() {
|
||||
})
|
||||
})
|
||||
|
||||
framework.Context("when querying /stats/summary under pressure", feature.KubeletPSI, framework.WithSerial(), func() {
|
||||
framework.Context("when querying /stats/summary under pressure", framework.WithSerial(), framework.WithFeatureGate(features.KubeletPSI), func() {
|
||||
ginkgo.BeforeEach(func() {
|
||||
if !utilfeature.DefaultFeatureGate.Enabled(features.KubeletPSI) {
|
||||
ginkgo.Skip("KubeletPSI feature gate is not enabled")
|
||||
}
|
||||
if !IsCgroup2UnifiedMode() {
|
||||
ginkgo.Skip("Skipping since CgroupV2 not used")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user