Skip to content

Commit 63992e1

Browse files
committed
dra e2e tests: add feature-gate label when these tests depend feature-gate
1 parent 8a39b60 commit 63992e1

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

test/e2e/dra/dra.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ import (
4545
"k8s.io/client-go/kubernetes"
4646
"k8s.io/dynamic-resource-allocation/resourceslice"
4747
"k8s.io/klog/v2"
48+
"k8s.io/kubernetes/pkg/features"
4849
"k8s.io/kubernetes/test/e2e/feature"
4950
"k8s.io/kubernetes/test/e2e/framework"
5051
e2edaemonset "k8s.io/kubernetes/test/e2e/framework/daemonset"
@@ -79,7 +80,7 @@ func perNode(maxAllocations int, nodes *Nodes) func() Resources {
7980
}
8081
}
8182

82-
var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, func() {
83+
var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, framework.WithFeatureGate(features.DynamicResourceAllocation), func() {
8384
f := framework.NewDefaultFramework("dra")
8485

8586
// The driver containers have to run with sufficient privileges to
@@ -404,7 +405,7 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation,
404405
}).WithTimeout(f.Timeouts.PodDelete).Should(gomega.HaveField("Status.Allocation", (*resourceapi.AllocationResult)(nil)))
405406
})
406407

407-
f.It("must be possible for the driver to update the ResourceClaim.Status.Devices once allocated", feature.DRAResourceClaimDeviceStatus, func(ctx context.Context) {
408+
f.It("must be possible for the driver to update the ResourceClaim.Status.Devices once allocated", feature.DRAResourceClaimDeviceStatus, framework.WithFeatureGate(features.DRAResourceClaimDeviceStatus), framework.WithFeatureGate(features.DynamicResourceAllocation), func(ctx context.Context) {
408409
pod := b.podExternal()
409410
claim := b.externalClaim()
410411
b.create(ctx, claim, pod)
@@ -898,7 +899,7 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation,
898899
driver := NewDriver(f, nodes, networkResources)
899900
b := newBuilder(f, driver)
900901

901-
f.It("support validating admission policy for admin access", feature.DRAAdminAccess, func(ctx context.Context) {
902+
f.It("support validating admission policy for admin access", feature.DRAAdminAccess, framework.WithFeatureGate(features.DRAAdminAccess), framework.WithFeatureGate(features.DynamicResourceAllocation), func(ctx context.Context) {
902903
// Create VAP, after making it unique to the current test.
903904
adminAccessPolicyYAML := strings.ReplaceAll(adminAccessPolicyYAML, "dra.example.com", b.f.UniqueName)
904905
driver.createFromYAML(ctx, []byte(adminAccessPolicyYAML), "")
@@ -1011,7 +1012,7 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation,
10111012
gomega.Expect(err).Should(gomega.MatchError(gomega.ContainSubstring("exceeded quota: object-count, requested: count/resourceclaims.resource.k8s.io=1, used: count/resourceclaims.resource.k8s.io=1, limited: count/resourceclaims.resource.k8s.io=1")), "creating second claim not allowed")
10121013
})
10131014

1014-
f.It("DaemonSet with admin access", feature.DRAAdminAccess, func(ctx context.Context) {
1015+
f.It("DaemonSet with admin access", feature.DRAAdminAccess, framework.WithFeatureGate(features.DRAAdminAccess), framework.WithFeatureGate(features.DynamicResourceAllocation), func(ctx context.Context) {
10151016
pod, template := b.podInline()
10161017
template.Spec.Spec.Devices.Requests[0].AdminAccess = ptr.To(true)
10171018
// Limit the daemon set to the one node where we have the driver.

0 commit comments

Comments
 (0)