Skip to content

Commit afb371e

Browse files
Merge pull request #357 from openshift-cherrypick-robot/cherry-pick-352-to-release-4.15
[release-4.15] OCPQE-26161,OCPBUGS-47534: update labels based on label proposal
2 parents 845dba9 + fa9a1df commit afb371e

12 files changed

+58
-35
lines changed

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,11 @@ build-e2e:
7676

7777
.PHONY: test-e2e
7878
test-e2e: ## Run openshift specific e2e test
79-
hack/ci-integration.sh $(GINKGO_ARGS) --label-filter='!periodic' -p
79+
hack/ci-integration.sh $(GINKGO_ARGS) --label-filter='!periodic&&!qe-only' -p
8080

8181
.PHONY: test-e2e-periodic
8282
test-e2e-periodic: ## Run openshift specific periodic e2e test
83-
hack/ci-integration.sh $(GINKGO_ARGS) --label-filter=periodic -p
83+
hack/ci-integration.sh $(GINKGO_ARGS) --label-filter='periodic&&!qe-only' -p
8484

8585
.PHONY: help
8686
help:

pkg/autoscaler/autoscaler.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ func machineAutoscalerResource(targetMachineSet *machinev1.MachineSet, minReplic
106106
}
107107
}
108108

109-
var _ = Describe("Autoscaler should", framework.LabelAutoscaler, Serial, func() {
109+
var _ = Describe("Autoscaler should", framework.LabelAutoscaler, framework.LabelDisruptive, Serial, func() {
110110

111111
var workloadMemRequest resource.Quantity
112112
var client runtimeclient.Client

pkg/framework/ginkgo-labels.go

+32-9
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,36 @@ package framework
33
import "github.com/onsi/ginkgo/v2"
44

55
var (
6-
LabelDisruptive = ginkgo.Label("disruptive")
7-
LabelAutoscaler = ginkgo.Label("autoscaler")
8-
LabelOperators = ginkgo.Label("operators")
9-
LabelPeriodic = ginkgo.Label("periodic")
10-
LabelSpot = ginkgo.Label("spot-instances")
11-
LabelMachines = ginkgo.Label("machines")
12-
LabelMachineHealthChecks = ginkgo.Label("machine-health-checks")
13-
LabelCloudProviderSpecific = ginkgo.Label("cloud-provider-specific")
14-
LabelProviderAWS = ginkgo.Label("AWS")
6+
// LabelAutoscaler applies to tests related to the cluster autoscaler functionality.
7+
LabelAutoscaler = ginkgo.Label("autoscaler")
8+
9+
// LabelCAPI applies to tests related to Cluster API (CAPI) functionality.
10+
LabelCAPI = ginkgo.Label("capi")
11+
12+
// LabelCCM applies to tests related to the Cloud Controller Manager (CCM).
13+
LabelCCM = ginkgo.Label("ccm")
14+
15+
// LabelDevOnly indicates that the test can run in dev account only.
16+
LabelDevOnly = ginkgo.Label("dev-only")
17+
18+
// LabelDisruptive marks tests that are disruptive in nature and may affect cluster stability.
19+
LabelDisruptive = ginkgo.Label("disruptive")
20+
21+
// LabelLEVEL0 indicates that the test is a basic or critical test, if failed then block release.
22+
LabelLEVEL0 = ginkgo.Label("LEVEL0")
23+
24+
// LabelMachineApprover applies to tests for the machine approver functionality.
25+
LabelMachineApprover = ginkgo.Label("machine-approver")
26+
27+
// LabelMachineHealthCheck applies to tests for Machine Health Checks (MHC) functionality.
28+
LabelMachineHealthCheck = ginkgo.Label("machine-health-check")
29+
30+
// LabelMAPI applies to tests related to the Machine API (MAPI).
31+
LabelMAPI = ginkgo.Label("mapi")
32+
33+
// LabelPeriodic marks tests that are meant to run periodically.
34+
LabelPeriodic = ginkgo.Label("periodic")
35+
36+
// LabelQEOnly indicates that the test can run in qe account only.
37+
LabelQEOnly = ginkgo.Label("qe-only")
1538
)

pkg/infra/infra.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ func deleteObjects(client runtimeclient.Client, delObjects map[string]runtimecli
147147
return nil
148148
}
149149

150-
var _ = Describe("Managed cluster should", framework.LabelMachines, func() {
150+
var _ = Describe("Managed cluster should", framework.LabelMAPI, func() {
151151
var client runtimeclient.Client
152152
var ctx context.Context
153153
var machineSet *machinev1.MachineSet
@@ -186,7 +186,7 @@ var _ = Describe("Managed cluster should", framework.LabelMachines, func() {
186186
}
187187
})
188188

189-
When("machineset has one replica", func() {
189+
When("machineset has one replica", framework.LabelDisruptive, func() {
190190
BeforeEach(func() {
191191
var err error
192192
machineSetParams = framework.BuildMachineSetParams(ctx, client, 1)
@@ -266,7 +266,7 @@ var _ = Describe("Managed cluster should", framework.LabelMachines, func() {
266266

267267
})
268268

269-
When("machineset has 2 replicas", func() {
269+
When("machineset has 2 replicas", framework.LabelDisruptive, func() {
270270
BeforeEach(func() {
271271
var err error
272272
machineSetParams = framework.BuildMachineSetParams(ctx, client, 2)
@@ -280,7 +280,7 @@ var _ = Describe("Managed cluster should", framework.LabelMachines, func() {
280280

281281
// Machines required for test: 2
282282
// Reason: We want to test that all machines get replaced when we delete them.
283-
It("recover from deleted worker machines", func() {
283+
It("recover from deleted worker machines", framework.LabelLEVEL0, func() {
284284
selector := machineSet.Spec.Selector
285285
machines, err := framework.GetMachines(ctx, client, &selector)
286286
Expect(err).ToNot(HaveOccurred(), "Listing Machines should succeed")
@@ -295,7 +295,7 @@ var _ = Describe("Managed cluster should", framework.LabelMachines, func() {
295295

296296
// Machines required for test: 4
297297
// Reason: MachineSet scales 2->0 and MachineSet2 scales 0->2. Changing to scaling 1->0 and 0->1 might not test this thoroughly.
298-
It("grow and decrease when scaling different machineSets simultaneously", framework.LabelPeriodic, func() {
298+
It("grow and decrease when scaling different machineSets simultaneously", framework.LabelPeriodic, framework.LabelLEVEL0, func() {
299299
By("Creating a second MachineSet") // Machineset 1 can start with 1 replica
300300
machineSetParams := framework.BuildMachineSetParams(ctx, client, 0)
301301
machineSet2, err := framework.CreateMachineSet(client, machineSetParams)

pkg/infra/lifecyclehooks.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const (
2929
pollingInterval = 3 * time.Second
3030
)
3131

32-
var _ = Describe("Lifecycle Hooks should", framework.LabelMachines, func() {
32+
var _ = Describe("Lifecycle Hooks should", framework.LabelMAPI, framework.LabelDisruptive, func() {
3333
var client runtimeclient.Client
3434
var machineSet *machinev1.MachineSet
3535
var workload *batchv1.Job

pkg/infra/spot.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const (
3838
spotMachineSetMaxProvisioningRetryCount = 3
3939
)
4040

41-
var _ = Describe("Running on Spot", framework.LabelMachines, framework.LabelSpot, func() {
41+
var _ = Describe("Running on Spot", framework.LabelMAPI, framework.LabelDisruptive, func() {
4242
var ctx = context.Background()
4343

4444
var client runtimeclient.Client

pkg/infra/webhooks.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
"github.com/openshift/cluster-api-actuator-pkg/pkg/framework/gatherer"
2323
)
2424

25-
var _ = Describe("Webhooks", framework.LabelMachines, func() {
25+
var _ = Describe("Webhooks", framework.LabelMAPI, framework.LabelDisruptive, func() {
2626
var client runtimeclient.Client
2727
var platform configv1.PlatformType
2828
var machineSetParams framework.MachineSetParams

pkg/machinehealthcheck/machinehealthcheck.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
"github.com/openshift/cluster-api-actuator-pkg/pkg/framework/gatherer"
1717
)
1818

19-
var _ = Describe("MachineHealthCheck", framework.LabelMachineHealthChecks, func() {
19+
var _ = Describe("MachineHealthCheck", framework.LabelMachineHealthCheck, framework.LabelDisruptive, func() {
2020
var client client.Client
2121
var ctx context.Context
2222

pkg/operators/cluster-autoscaler-operator.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
"github.com/openshift/cluster-api-actuator-pkg/pkg/framework/gatherer"
1919
)
2020

21-
var _ = Describe("Cluster autoscaler operator should", framework.LabelOperators, framework.LabelAutoscaler, func() {
21+
var _ = Describe("Cluster autoscaler operator should", framework.LabelAutoscaler, func() {
2222
var client runtimeclient.Client
2323
var ctx context.Context
2424
var gatherer *gatherer.StateGatherer
@@ -86,7 +86,7 @@ var _ = Describe("Cluster autoscaler operator should", framework.LabelOperators,
8686
})
8787
})
8888

89-
var _ = Describe("Cluster autoscaler operator deployment should", framework.LabelOperators, framework.LabelAutoscaler, func() {
89+
var _ = Describe("Cluster autoscaler operator deployment should", framework.LabelAutoscaler, framework.LabelLEVEL0, func() {
9090
It("be available", func() {
9191
client, err := framework.LoadClient()
9292
Expect(err).NotTo(HaveOccurred(), "Failed to load client")
@@ -97,7 +97,7 @@ var _ = Describe("Cluster autoscaler operator deployment should", framework.Labe
9797
})
9898
})
9999

100-
var _ = Describe("Cluster autoscaler cluster operator status should", framework.LabelOperators, framework.LabelAutoscaler, func() {
100+
var _ = Describe("Cluster autoscaler cluster operator status should", framework.LabelAutoscaler, framework.LabelLEVEL0, func() {
101101
It("be available", func() {
102102
client, err := framework.LoadClient()
103103
Expect(err).NotTo(HaveOccurred(), "Failed to load client")

pkg/operators/cluster-machine-approver.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const (
1313
cmaNamespace = "openshift-cluster-machine-approver"
1414
)
1515

16-
var _ = Describe("Cluster Machine Approver deployment", framework.LabelOperators, func() {
16+
var _ = Describe("Cluster Machine Approver deployment", framework.LabelMachineApprover, framework.LabelLEVEL0, func() {
1717
It("should be available", func() {
1818
ctx := framework.GetContext()
1919

@@ -25,7 +25,7 @@ var _ = Describe("Cluster Machine Approver deployment", framework.LabelOperators
2525
})
2626
})
2727

28-
var _ = Describe("Cluster Machine Approver Cluster Operator Status", framework.LabelOperators, func() {
28+
var _ = Describe("Cluster Machine Approver Cluster Operator Status", framework.LabelMachineApprover, framework.LabelLEVEL0, func() {
2929
It("should be available", func() {
3030
client, err := framework.LoadClient()
3131
Expect(err).NotTo(HaveOccurred(), "Failed to load client")

pkg/operators/machine-api-operator.go

+8-8
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ var (
2424

2525
var _ = Describe(
2626
"Machine API operator deployment should",
27-
framework.LabelDisruptive, framework.LabelOperators, framework.LabelMachines,
27+
framework.LabelMAPI,
2828
Serial,
2929
func() {
3030
var gatherer *gatherer.StateGatherer
@@ -42,15 +42,15 @@ var _ = Describe(
4242
}
4343
})
4444

45-
It("be available", func() {
45+
It("be available", framework.LabelLEVEL0, func() {
4646
ctx := framework.GetContext()
4747
client, err := framework.LoadClient()
4848
Expect(err).NotTo(HaveOccurred(), "Failed to load client")
4949
Expect(framework.IsDeploymentAvailable(ctx, client, maoDeployment, framework.MachineAPINamespace)).To(BeTrue(),
5050
fmt.Sprintf("Failed to wait for %s Deployment to become available", maoDeployment))
5151
})
5252

53-
It("reconcile controllers deployment", func() {
53+
It("reconcile controllers deployment", framework.LabelDisruptive, func() {
5454
ctx := framework.GetContext()
5555
client, err := framework.LoadClient()
5656
Expect(err).NotTo(HaveOccurred(), "Failed to load client")
@@ -75,7 +75,7 @@ var _ = Describe(
7575
fmt.Sprintf("Failed verifying %s Deployment spec has been reconciled", maoManagedDeployment))
7676
})
7777

78-
It("maintains deployment spec", func() {
78+
It("maintains deployment spec", framework.LabelDisruptive, func() {
7979
ctx := framework.GetContext()
8080
client, err := framework.LoadClient()
8181
Expect(err).NotTo(HaveOccurred(), "Failed to load client")
@@ -217,7 +217,7 @@ var _ = Describe(
217217
}
218218
})
219219

220-
It("maintains spec after validating webhook configuration change and preserve caBundle", func() {
220+
It("maintains spec after validating webhook configuration change and preserve caBundle", framework.LabelDisruptive, func() {
221221
client, err := framework.LoadClient()
222222
Expect(err).NotTo(HaveOccurred(), "Failed to load client")
223223

@@ -251,8 +251,8 @@ var _ = Describe(
251251
})
252252

253253
var _ = Describe(
254-
"Machine API cluster operator status should", framework.LabelOperators, framework.LabelMachines, func() {
255-
It("be available", func() {
254+
"Machine API cluster operator status should", framework.LabelMAPI, func() {
255+
It("be available", framework.LabelLEVEL0, func() {
256256
ctx := framework.GetContext()
257257

258258
client, err := framework.LoadClient()
@@ -265,7 +265,7 @@ var _ = Describe(
265265

266266
var _ = Describe(
267267
"When cluster-wide proxy is configured, Machine API cluster operator should ",
268-
framework.LabelDisruptive, framework.LabelOperators, framework.LabelPeriodic, framework.LabelMachines,
268+
framework.LabelDisruptive, framework.LabelPeriodic, framework.LabelMAPI,
269269
Serial,
270270
func() {
271271
var gatherer *gatherer.StateGatherer

pkg/providers/aws.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const (
2323
amiIDMetadataEndpoint = "http://169.254.169.254/latest/meta-data/ami-id"
2424
)
2525

26-
var _ = Describe("MetadataServiceOptions", framework.LabelCloudProviderSpecific, framework.LabelProviderAWS, func() {
26+
var _ = Describe("MetadataServiceOptions", framework.LabelDisruptive, framework.LabelMAPI, func() {
2727
var client runtimeclient.Client
2828
var clientset *kubernetes.Clientset
2929

0 commit comments

Comments
 (0)