e2e: enforce usage of WithFlaky instead of [Flaky]

Now that we have it (8a89a1f5a5), let's also make sure that
the new WithFlaky is used everywhere instead if [Flaky]. This way it can be
used for filtering by label.
This commit is contained in:
Patrick Ohly 2024-01-19 12:17:37 +01:00
parent eb1ae05cf0
commit de014579a1
6 changed files with 8 additions and 8 deletions

View File

@ -479,7 +479,7 @@ var _ = SIGDescribe("CustomResourcePublishOpenAPI [Privileged:ClusterAdmin]", fu
})
// Marked as flaky until https://github.com/kubernetes/kubernetes/issues/65517 is solved.
ginkgo.It("[Flaky] kubectl explain works for CR with the same resource name as built-in object.", func(ctx context.Context) {
f.It(f.WithFlaky(), "kubectl explain works for CR with the same resource name as built-in object.", func(ctx context.Context) {
customServiceShortName := fmt.Sprintf("ksvc-%d", time.Now().Unix()) // make short name unique
opt := func(crd *apiextensionsv1.CustomResourceDefinition) {
crd.ObjectMeta = metav1.ObjectMeta{Name: "services." + crd.Spec.Group}

View File

@ -248,7 +248,7 @@ func registerInSuite(ginkgoCall func(string, ...interface{}) bool, args []interf
var (
tagRe = regexp.MustCompile(`\[.*?\]`)
deprecatedTags = sets.New("Conformance", "NodeConformance", "Disruptive", "Serial", "Slow")
deprecatedTags = sets.New("Conformance", "Flaky", "NodeConformance", "Disruptive", "Serial", "Slow")
deprecatedTagPrefixes = sets.New("Environment", "Feature", "NodeFeature", "FeatureGate")
deprecatedStability = sets.New("Alpha", "Beta")
)

View File

@ -385,7 +385,7 @@ var _ = SIGDescribe("kubelet", func() {
})
// Test host cleanup when disrupting the volume environment.
ginkgo.Describe("host cleanup with volume mounts [HostCleanup][Flaky]", func() {
f.Describe("host cleanup with volume mounts [HostCleanup]", f.WithFlaky(), func() {
type hostCleanupTest struct {
itDescr string

View File

@ -186,15 +186,15 @@ var _ = SIGDescribe("Security Context", func() {
})
})
ginkgo.It("should support volume SELinux relabeling [Flaky] [LinuxOnly]", func(ctx context.Context) {
f.It("should support volume SELinux relabeling", f.WithFlaky(), f.WithLabel("LinuxOnly"), func(ctx context.Context) {
testPodSELinuxLabeling(ctx, f, false, false)
})
ginkgo.It("should support volume SELinux relabeling when using hostIPC [Flaky] [LinuxOnly]", func(ctx context.Context) {
f.It("should support volume SELinux relabeling when using hostIPC", f.WithFlaky(), f.WithLabel("LinuxOnly"), func(ctx context.Context) {
testPodSELinuxLabeling(ctx, f, true, false)
})
ginkgo.It("should support volume SELinux relabeling when using hostPID [Flaky] [LinuxOnly]", func(ctx context.Context) {
f.It("should support volume SELinux relabeling when using hostPID", f.WithFlaky(), f.WithLabel("LinuxOnly"), func(ctx context.Context) {
testPodSELinuxLabeling(ctx, f, false, true)
})

View File

@ -75,7 +75,7 @@ func checkForControllerManagerHealthy(ctx context.Context, duration time.Duratio
return nil
}
var _ = utils.SIGDescribe("NFSPersistentVolumes", framework.WithDisruptive(), "[Flaky]", func() {
var _ = utils.SIGDescribe("NFSPersistentVolumes", framework.WithDisruptive(), framework.WithFlaky(), func() {
f := framework.NewDefaultFramework("disruptive-pv")
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged

View File

@ -294,7 +294,7 @@ var _ = utils.SIGDescribe("PersistentVolumes-local", func() {
e2epod.DeletePodOrFail(ctx, config.client, config.ns, pod2.Name)
})
ginkgo.It("should set different fsGroup for second pod if first pod is deleted [Flaky]", func(ctx context.Context) {
f.It("should set different fsGroup for second pod if first pod is deleted", f.WithFlaky(), func(ctx context.Context) {
// TODO: Disabled temporarily, remove [Flaky] tag after #73168 is fixed.
fsGroup1, fsGroup2 := int64(1234), int64(4321)
ginkgo.By("Create first pod and check fsGroup is set")