Skip to content

Commit f2cfbf4

Browse files
committed
e2e: use framework labels
This changes the text registration so that tags for which the framework has a dedicated API (features, feature gates, slow, serial, etc.) those APIs are used. Arbitrary, custom tags are still left in place for now.
1 parent 833156b commit f2cfbf4

File tree

230 files changed

+834
-680
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

230 files changed

+834
-680
lines changed

test/conformance/testdata/conformance.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3035,7 +3035,7 @@
30353035
file: test/e2e/storage/persistent_volumes.go
30363036
- testname: Projected Volume, multiple projections
30373037
codename: '[sig-storage] Projected combined should project all components that make
3038-
up the projection API [Projection][NodeConformance] [Conformance]'
3038+
up the projection API [Projection] [NodeConformance] [Conformance]'
30393039
description: A Pod is created with a projected volume source for secrets, configMap
30403040
and downwardAPI with pod name, cpu and memory limits and cpu and memory requests.
30413041
Pod MUST be able to read the secrets, configMap values and the cpu and memory

test/e2e/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ import (
5959
"github.com/onsi/ginkgo"
6060
"k8s.io/kubernetes/test/e2e/lifecycle"
6161
)
62-
var _ = lifecycle.SIGDescribe("[Feature:BootstrapTokens]", func() {
62+
var _ = lifecycle.SIGDescribe("cluster", feature.BootstrapTokens, func() {
6363
/* ... */
6464
ginkgo.It("should sign the new added bootstrap tokens", func(ctx context.Context) {
6565
/* ... */

test/e2e/apimachinery/apiserver_identity.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ import (
2626
"strings"
2727
"time"
2828

29-
"github.com/onsi/ginkgo/v2"
3029
"github.com/onsi/gomega"
3130
"golang.org/x/crypto/cryptobyte"
3231

3332
v1 "k8s.io/api/core/v1"
3433
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
3534
"k8s.io/apimachinery/pkg/util/wait"
35+
"k8s.io/kubernetes/test/e2e/feature"
3636
"k8s.io/kubernetes/test/e2e/framework"
3737
e2enode "k8s.io/kubernetes/test/e2e/framework/node"
3838
e2eskipper "k8s.io/kubernetes/test/e2e/framework/skipper"
@@ -80,11 +80,11 @@ func restartAPIServer(ctx context.Context, node *v1.Node) error {
8080
}
8181

8282
// This test requires that --feature-gates=APIServerIdentity=true be set on the apiserver
83-
var _ = SIGDescribe("kube-apiserver identity [Feature:APIServerIdentity]", func() {
83+
var _ = SIGDescribe("kube-apiserver identity", feature.APIServerIdentity, func() {
8484
f := framework.NewDefaultFramework("kube-apiserver-identity")
8585
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
8686

87-
ginkgo.It("kube-apiserver identity should persist after restart [Disruptive]", func(ctx context.Context) {
87+
f.It("kube-apiserver identity should persist after restart", f.WithDisruptive(), func(ctx context.Context) {
8888
e2eskipper.SkipUnlessProviderIs("gce")
8989

9090
client := f.ClientSet

test/e2e/apimachinery/chunking.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ var _ = SIGDescribe("Servers with support for API chunking", func() {
141141
MUST return the remaining items in chunks of the size not exceeding the limit, with appropriately
142142
set RemainingItems field in the response and with the ResourceVersion returned as part of the inconsistent list.
143143
*/
144-
framework.ConformanceIt("should support continue listing from the last key if the original version has been compacted away, though the list is inconsistent [Slow]", func(ctx context.Context) {
144+
framework.ConformanceIt("should support continue listing from the last key if the original version has been compacted away, though the list is inconsistent", f.WithSlow(), func(ctx context.Context) {
145145
ns := f.Namespace.Name
146146
c := f.ClientSet
147147
client := c.CoreV1().PodTemplates(ns)

test/e2e/apimachinery/etcd_failure.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import (
3636
"github.com/onsi/ginkgo/v2"
3737
)
3838

39-
var _ = SIGDescribe("Etcd failure [Disruptive]", func() {
39+
var _ = SIGDescribe("Etcd failure", framework.WithDisruptive(), func() {
4040

4141
f := framework.NewDefaultFramework("etcd-failure")
4242
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged

test/e2e/apimachinery/namespace.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ import (
3636
"k8s.io/apimachinery/pkg/util/wait"
3737
clientscheme "k8s.io/client-go/kubernetes/scheme"
3838
"k8s.io/client-go/util/retry"
39+
"k8s.io/kubernetes/test/e2e/feature"
3940
"k8s.io/kubernetes/test/e2e/framework"
4041
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
4142
imageutils "k8s.io/kubernetes/test/utils/image"
@@ -231,7 +232,7 @@ func ensureServicesAreRemovedWhenNamespaceIsDeleted(ctx context.Context, f *fram
231232
// that each have a variable amount of content in the associated Namespace.
232233
// When run in [Serial] this test appears to delete Namespace objects at a
233234
// rate of approximately 1 per second.
234-
var _ = SIGDescribe("Namespaces [Serial]", func() {
235+
var _ = SIGDescribe("Namespaces", framework.WithSerial(), func() {
235236

236237
f := framework.NewDefaultFramework("namespaces")
237238
f.NamespacePodSecurityLevel = admissionapi.LevelBaseline
@@ -259,7 +260,7 @@ var _ = SIGDescribe("Namespaces [Serial]", func() {
259260
})
260261

261262
// On hold until etcd3; see #7372
262-
ginkgo.It("should always delete fast (ALL of 100 namespaces in 150 seconds) [Feature:ComprehensiveNamespaceDraining]", func(ctx context.Context) {
263+
f.It("should always delete fast (ALL of 100 namespaces in 150 seconds)", feature.ComprehensiveNamespaceDraining, func(ctx context.Context) {
263264
extinguish(ctx, f, 100, 0, 150)
264265
})
265266

test/e2e/apimachinery/resource_quota.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ import (
4646
watchtools "k8s.io/client-go/tools/watch"
4747
"k8s.io/client-go/util/retry"
4848
"k8s.io/kubernetes/pkg/quota/v1/evaluator/core"
49+
"k8s.io/kubernetes/test/e2e/feature"
4950
"k8s.io/kubernetes/test/e2e/framework"
5051
"k8s.io/kubernetes/test/utils/crd"
5152
imageutils "k8s.io/kubernetes/test/utils/image"
@@ -1203,7 +1204,7 @@ var _ = SIGDescribe("ResourceQuota", func() {
12031204
})
12041205
})
12051206

1206-
var _ = SIGDescribe("ResourceQuota [Feature:ScopeSelectors]", func() {
1207+
var _ = SIGDescribe("ResourceQuota", feature.ScopeSelectors, func() {
12071208
f := framework.NewDefaultFramework("scope-selectors")
12081209
f.NamespacePodSecurityLevel = admissionapi.LevelBaseline
12091210
ginkgo.It("should verify ResourceQuota with best effort scope using scope-selectors.", func(ctx context.Context) {
@@ -1384,7 +1385,7 @@ var _ = SIGDescribe("ResourceQuota [Feature:ScopeSelectors]", func() {
13841385
})
13851386
})
13861387

1387-
var _ = SIGDescribe("ResourceQuota [Feature:PodPriority]", func() {
1388+
var _ = SIGDescribe("ResourceQuota", feature.PodPriority, func() {
13881389
f := framework.NewDefaultFramework("resourcequota-priorityclass")
13891390
f.NamespacePodSecurityLevel = admissionapi.LevelBaseline
13901391

test/e2e/apimachinery/storage_version.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import (
2424
apierrors "k8s.io/apimachinery/pkg/api/errors"
2525
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2626
"k8s.io/apimachinery/pkg/util/wait"
27+
"k8s.io/kubernetes/test/e2e/feature"
2728
"k8s.io/kubernetes/test/e2e/framework"
2829
admissionapi "k8s.io/pod-security-admission/api"
2930

@@ -36,7 +37,7 @@ const (
3637
)
3738

3839
// This test requires that --feature-gates=APIServerIdentity=true,StorageVersionAPI=true be set on the apiserver and the controller manager
39-
var _ = SIGDescribe("StorageVersion resources [Feature:StorageVersionAPI]", func() {
40+
var _ = SIGDescribe("StorageVersion resources", feature.StorageVersionAPI, func() {
4041
f := framework.NewDefaultFramework("storage-version")
4142
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
4243

test/e2e/apimachinery/watchlist.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,11 @@ import (
3232
"k8s.io/apimachinery/pkg/util/wait"
3333
"k8s.io/apimachinery/pkg/watch"
3434
"k8s.io/client-go/tools/cache"
35+
"k8s.io/kubernetes/test/e2e/feature"
3536
"k8s.io/kubernetes/test/e2e/framework"
3637
)
3738

38-
var _ = SIGDescribe("API Streaming (aka. WatchList) [Serial] [Feature:WatchList]", func() {
39+
var _ = SIGDescribe("API Streaming (aka. WatchList)", framework.WithSerial(), feature.WatchList, func() {
3940
f := framework.NewDefaultFramework("watchlist")
4041
ginkgo.It("should be requested when ENABLE_CLIENT_GO_WATCH_LIST_ALPHA is set", func(ctx context.Context) {
4142
prevWatchListEnvValue, wasWatchListEnvSet := os.LookupEnv("ENABLE_CLIENT_GO_WATCH_LIST_ALPHA")

test/e2e/apps/controller_revision.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ const (
5454
// happen. In the future, running in parallel may work if we have an eviction
5555
// model which lets the DS controller kick out other pods to make room.
5656
// See https://issues.k8s.io/21767 for more details
57-
var _ = SIGDescribe("ControllerRevision [Serial]", func() {
57+
var _ = SIGDescribe("ControllerRevision", framework.WithSerial(), func() {
5858
var f *framework.Framework
5959

6060
ginkgo.AfterEach(func(ctx context.Context) {

0 commit comments

Comments
 (0)