tag TrafficDistribution tests to avoid running on clusters without the feature enabled

This commit is contained in:
Antonio Ojea 2024-04-26 17:15:35 +00:00
parent 8a9031f9c9
commit 484f8bc54b
2 changed files with 8 additions and 2 deletions

View File

@ -334,9 +334,14 @@ var (
// TODO: document the feature (owning SIG, when to use this feature for a test)
StorageVersionAPI = framework.WithFeature(framework.ValidFeatures.Add("StorageVersionAPI"))
// TODO: document the feature (owning SIG, when to use this feature for a test)
// Owner: sig-network
// Marks tests that require a cluster with Topology Hints enabled.
TopologyHints = framework.WithFeature(framework.ValidFeatures.Add("Topology Hints"))
// Owner: sig-network
// Marks tests that require a cluster with Traffic Distribution enabled.
TrafficDistribution = framework.WithFeature(framework.ValidFeatures.Add("Traffic Distribution"))
// TODO: document the feature (owning SIG, when to use this feature for a test)
TopologyManager = framework.WithFeature(framework.ValidFeatures.Add("TopologyManager"))

View File

@ -28,6 +28,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/intstr"
clientset "k8s.io/client-go/kubernetes"
"k8s.io/kubernetes/test/e2e/feature"
"k8s.io/kubernetes/test/e2e/framework"
e2enode "k8s.io/kubernetes/test/e2e/framework/node"
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
@ -41,7 +42,7 @@ import (
"github.com/onsi/gomega"
)
var _ = common.SIGDescribe("TrafficDistribution", func() {
var _ = common.SIGDescribe(feature.TrafficDistribution, func() {
f := framework.NewDefaultFramework("traffic-distribution")
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged