Skip to content

Commit

Permalink
Fix wrong labels in cluster_eviction_strategy_test (#2861)
Browse files Browse the repository at this point in the history
SNO and highly available labels were switched.

Also, rename the highly available label for better readability.

Signed-off-by: Nahshon Unna-Tsameret <nunnatsa@redhat.com>
  • Loading branch information
nunnatsa authored Apr 3, 2024
1 parent 5676158 commit b817b05
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 12 deletions.
2 changes: 1 addition & 1 deletion tests/func-tests/cli_download_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
tests "github.com/kubevirt/hyperconverged-cluster-operator/tests/func-tests"
)

var _ = Describe("[rfe_id:5100][crit:medium][vendor:cnv-qe@redhat.com][level:system]HyperConverged Cluster Operator should create ConsoleCliDownload objects", Label("OpenShift"), func() {
var _ = Describe("[rfe_id:5100][crit:medium][vendor:cnv-qe@redhat.com][level:system]HyperConverged Cluster Operator should create ConsoleCliDownload objects", Label(openshiftLabel), func() {
flag.Parse()

BeforeEach(func() {
Expand Down
4 changes: 2 additions & 2 deletions tests/func-tests/cluster_eviction_strategy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ var _ = Describe("Cluster level evictionStrategy default value", Serial, Ordered
_ = tests.UpdateHCORetry(ctx, cli, hc)
})

It("Should set spec.evictionStrategy = None by default on single worker clusters", Label("MULTI_NODE_ONLY"), func() {
It("Should set spec.evictionStrategy = None by default on single worker clusters", Label(singleNodeLabel), func() {
if !singleworkerCluster {
Skip("Skipping single worker cluster test having more than one worker node")
}
Expand All @@ -55,7 +55,7 @@ var _ = Describe("Cluster level evictionStrategy default value", Serial, Ordered
Expect(hco.Spec.EvictionStrategy).To(Equal(&noneEvictionStrategy))
})

It("Should set spec.evictionStrategy = LiveMigrate by default with multiple worker node", Label("SINGLE_NODE_ONLY"), func() {
It("Should set spec.evictionStrategy = LiveMigrate by default with multiple worker node", Label(highlyAvailableClusterLabel), func() {
if singleworkerCluster {
Skip("Skipping not single worker cluster test having a single worker node")
}
Expand Down
2 changes: 1 addition & 1 deletion tests/func-tests/console_plugin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const (
openshiftConsoleNamespace = "openshift-console"
)

var _ = Describe("kubevirt console plugin", Label("OpenShift"), func() {
var _ = Describe("kubevirt console plugin", Label(openshiftLabel), func() {
var (
cli kubecli.KubevirtClient
ctx context.Context
Expand Down
2 changes: 1 addition & 1 deletion tests/func-tests/dashboard_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
tests "github.com/kubevirt/hyperconverged-cluster-operator/tests/func-tests"
)

var _ = Describe("[rfe_id:5108][crit:medium][vendor:cnv-qe@redhat.com][level:system]Dashboard configmaps", Label("OpenShift"), func() {
var _ = Describe("[rfe_id:5108][crit:medium][vendor:cnv-qe@redhat.com][level:system]Dashboard configmaps", Label(openshiftLabel), func() {
flag.Parse()

BeforeEach(func() {
Expand Down
2 changes: 1 addition & 1 deletion tests/func-tests/golden_image_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ var (
}
)

var _ = Describe("golden image test", Label("data-import-cron"), Serial, Ordered, Label("OpenShift"), func() {
var _ = Describe("golden image test", Label("data-import-cron"), Serial, Ordered, Label(openshiftLabel), func() {
var (
cli kubecli.KubevirtClient
ctx context.Context
Expand Down
10 changes: 9 additions & 1 deletion tests/func-tests/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,17 @@ import (
"k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

tests "github.com/kubevirt/hyperconverged-cluster-operator/tests/func-tests"
"kubevirt.io/client-go/kubecli"
kvtutil "kubevirt.io/kubevirt/tests/util"

tests "github.com/kubevirt/hyperconverged-cluster-operator/tests/func-tests"
)

// labels
const (
singleNodeLabel = "SINGLE_NODE_ONLY"
highlyAvailableClusterLabel = "HIGHLY_AVAILABLE_CLUSTER"
openshiftLabel = "OpenShift"
)

func TestTests(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion tests/func-tests/monitoring_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const (
criticalImpact
)

var _ = Describe("[crit:high][vendor:cnv-qe@redhat.com][level:system]Monitoring", Serial, Ordered, Label("OpenShift"), func() {
var _ = Describe("[crit:high][vendor:cnv-qe@redhat.com][level:system]Monitoring", Serial, Ordered, Label(openshiftLabel), func() {
flag.Parse()

var err error
Expand Down
4 changes: 2 additions & 2 deletions tests/func-tests/mtq_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ var _ = Describe("Test MTQ", Label("MTQ"), Serial, Ordered, func() {
})

When("set the EnableManagedTenantQuota FG", func() {
It("should create the MTQ CR and all the pods", Label("MULTI_NODE_ONLY"), func() {
It("should create the MTQ CR and all the pods", Label(highlyAvailableClusterLabel), func() {

if singleWorkerCluster {
Skip("Don't test MTQ on single node")
Expand Down Expand Up @@ -90,7 +90,7 @@ var _ = Describe("Test MTQ", Label("MTQ"), Serial, Ordered, func() {
Should(Succeed())
})

It("should reject setting of the FG in SNO", Label("SINGLE_NODE_ONLY"), func() {
It("should reject setting of the FG in SNO", Label(singleNodeLabel), func() {
if !singleWorkerCluster {
Skip("this test is not relevant for highly available clusters")
}
Expand Down
2 changes: 1 addition & 1 deletion tests/func-tests/node_placement_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const (
workloads = "workloads"
)

var _ = Describe("[rfe_id:4356][crit:medium][vendor:cnv-qe@redhat.com][level:system]Node Placement", Ordered, Serial, Label("MULTI_NODE_ONLY"), func() {
var _ = Describe("[rfe_id:4356][crit:medium][vendor:cnv-qe@redhat.com][level:system]Node Placement", Ordered, Serial, Label(highlyAvailableClusterLabel), func() {
ctx := context.TODO()
tests.FlagParse()
hco := &hcov1beta1.HyperConverged{}
Expand Down
2 changes: 1 addition & 1 deletion tests/func-tests/quickstart_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
tests "github.com/kubevirt/hyperconverged-cluster-operator/tests/func-tests"
)

var _ = Describe("[rfe_id:5882][crit:high][vendor:cnv-qe@redhat.com][level:system]ConsoleQuickStart objects", Label("OpenShift"), func() {
var _ = Describe("[rfe_id:5882][crit:high][vendor:cnv-qe@redhat.com][level:system]ConsoleQuickStart objects", Label(openshiftLabel), func() {
flag.Parse()

BeforeEach(func() {
Expand Down

0 comments on commit b817b05

Please sign in to comment.