Skip to content

Commit 7f6220d

Browse files
authored
Merge pull request kubernetes#129153 from carlory/e2e-dra
dra e2e tests: add feature-gate label when these tests depend feature-gate
2 parents 16da295 + 63992e1 commit 7f6220d

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), "")
@@ -1017,7 +1018,7 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation,
10171018
}).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")
10181019
})
10191020

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

0 commit comments

Comments
 (0)