Skip to content

Commit

Permalink
update cases labels
Browse files Browse the repository at this point in the history
  • Loading branch information
sunzhaohua2 committed Nov 26, 2024
1 parent af0b63d commit 6923fff
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 20 deletions.
2 changes: 1 addition & 1 deletion pkg/autoscaler/autoscaler.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func machineAutoscalerResource(targetMachineSet *machinev1.MachineSet, minReplic
}
}

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

var workloadMemRequest resource.Quantity
var client runtimeclient.Client
Expand Down
11 changes: 6 additions & 5 deletions pkg/framework/ginkgo-labels.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ package framework
import "github.com/onsi/ginkgo/v2"

var (
LabelCAPI = ginkgo.Label("capi")
LabelDisruptive = ginkgo.Label("disruptive")
LabelAutoscaler = ginkgo.Label("autoscaler")
LabelCAPI = ginkgo.Label("capi")
LabelMAPI = ginkgo.Label("mapi")
LabelMachineHealthChecks = ginkgo.Label("machine-health-checks")
LabelMachineApprover = ginkgo.Label("machine-approver")
LabelOperators = ginkgo.Label("operators")
LabelPeriodic = ginkgo.Label("periodic")
LabelSpot = ginkgo.Label("spot-instances")
LabelMachines = ginkgo.Label("machines")
LabelMachineHealthChecks = ginkgo.Label("machine-health-checks")
LabelDisruptive = ginkgo.Label("disruptive")
LabelPeriodic = ginkgo.Label("periodic")
LabelCloudProviderSpecific = ginkgo.Label("cloud-provider-specific")
LabelProviderAWS = ginkgo.Label("AWS")
)
6 changes: 3 additions & 3 deletions pkg/infra/infra.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ func deleteObjects(client runtimeclient.Client, delObjects map[string]runtimecli
return nil
}

var _ = Describe("Managed cluster should", framework.LabelMachines, func() {
var _ = Describe("Managed cluster should", framework.LabelMAPI, func() {
var client runtimeclient.Client
var ctx context.Context
var machineSet *machinev1.MachineSet
Expand Down Expand Up @@ -186,7 +186,7 @@ var _ = Describe("Managed cluster should", framework.LabelMachines, func() {
}
})

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

})

When("machineset has 2 replicas", func() {
When("machineset has 2 replicas", framework.LabelDisruptive, func() {
BeforeEach(func() {
var err error
machineSetParams = framework.BuildMachineSetParams(ctx, client, 2)
Expand Down
2 changes: 1 addition & 1 deletion pkg/infra/lifecyclehooks.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const (
pollingInterval = 3 * time.Second
)

var _ = Describe("Lifecycle Hooks should", framework.LabelMachines, func() {
var _ = Describe("Lifecycle Hooks should", framework.LabelMAPI, framework.LabelDisruptive, func() {
var client runtimeclient.Client
var machineSet *machinev1.MachineSet
var workload *batchv1.Job
Expand Down
2 changes: 1 addition & 1 deletion pkg/infra/spot.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const (
spotMachineSetMaxProvisioningRetryCount = 3
)

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

var client runtimeclient.Client
Expand Down
2 changes: 1 addition & 1 deletion pkg/infra/webhooks.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"github.com/openshift/cluster-api-actuator-pkg/pkg/framework/gatherer"
)

var _ = Describe("Webhooks", framework.LabelMachines, func() {
var _ = Describe("Webhooks", framework.LabelMAPI, func() {
var client runtimeclient.Client
var platform configv1.PlatformType
var machineSetParams framework.MachineSetParams
Expand Down
2 changes: 1 addition & 1 deletion pkg/machinehealthcheck/machinehealthcheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"github.com/openshift/cluster-api-actuator-pkg/pkg/framework/gatherer"
)

var _ = Describe("MachineHealthCheck", framework.LabelMachineHealthChecks, func() {
var _ = Describe("MachineHealthCheck", framework.LabelMachineHealthChecks, framework.LabelDisruptive, func() {
var client client.Client
var ctx context.Context

Expand Down
4 changes: 2 additions & 2 deletions pkg/operators/cluster-machine-approver.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const (
cmaNamespace = "openshift-cluster-machine-approver"
)

var _ = Describe("Cluster Machine Approver deployment", framework.LabelOperators, func() {
var _ = Describe("Cluster Machine Approver deployment", framework.LabelOperators, framework.LabelMachineApprover, func() {
It("should be available", func() {
ctx := framework.GetContext()

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

var _ = Describe("Cluster Machine Approver Cluster Operator Status", framework.LabelOperators, func() {
var _ = Describe("Cluster Machine Approver Cluster Operator Status", framework.LabelOperators, framework.LabelMachineApprover, func() {
It("should be available", func() {
client, err := framework.LoadClient()
Expect(err).NotTo(HaveOccurred(), "Failed to load client")
Expand Down
6 changes: 3 additions & 3 deletions pkg/operators/machine-api-operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ var (

var _ = Describe(
"Machine API operator deployment should",
framework.LabelDisruptive, framework.LabelOperators, framework.LabelMachines,
framework.LabelDisruptive, framework.LabelOperators, framework.LabelMAPI,
Serial,
func() {
var gatherer *gatherer.StateGatherer
Expand Down Expand Up @@ -251,7 +251,7 @@ var _ = Describe(
})

var _ = Describe(
"Machine API cluster operator status should", framework.LabelOperators, framework.LabelMachines, func() {
"Machine API cluster operator status should", framework.LabelOperators, framework.LabelMAPI, func() {
It("be available", func() {
ctx := framework.GetContext()

Expand All @@ -265,7 +265,7 @@ var _ = Describe(

var _ = Describe(
"When cluster-wide proxy is configured, Machine API cluster operator should ",
framework.LabelDisruptive, framework.LabelOperators, framework.LabelPeriodic, framework.LabelMachines,
framework.LabelDisruptive, framework.LabelOperators, framework.LabelPeriodic, framework.LabelMAPI,
Serial,
func() {
var gatherer *gatherer.StateGatherer
Expand Down
4 changes: 2 additions & 2 deletions pkg/providers/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func createAWSClient(oc *gatherer.CLI) *framework.AwsClient {
return aClient
}

var _ = Describe("MetadataServiceOptions", framework.LabelCloudProviderSpecific, framework.LabelProviderAWS, func() {
var _ = Describe("MetadataServiceOptions", framework.LabelCloudProviderSpecific, framework.LabelProviderAWS, framework.LabelDisruptive, func() {
var client runtimeclient.Client
var clientset *kubernetes.Clientset

Expand Down Expand Up @@ -197,7 +197,7 @@ var _ = Describe("MetadataServiceOptions", framework.LabelCloudProviderSpecific,
})
})

var _ = Describe("CapacityReservationID", framework.LabelCloudProviderSpecific, framework.LabelProviderAWS, func() {
var _ = Describe("CapacityReservationID", framework.LabelCloudProviderSpecific, framework.LabelProviderAWS, framework.LabelDisruptive, func() {
var client runtimeclient.Client
var gatherer *gatherer.StateGatherer
var ctx context.Context
Expand Down

0 comments on commit 6923fff

Please sign in to comment.