Skip to content

Commit 0a31ca8

Browse files
Merge pull request #30309 from isabella-janssen/mco-1865
MCO-1865: Update MCO tests to be in only one test suite each
2 parents b2be961 + 1de9020 commit 0a31ca8

File tree

4 files changed

+30
-24
lines changed

4 files changed

+30
-24
lines changed

test/extended/machine_config/boot_image_update_aws.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import (
1010
exutil "github.com/openshift/origin/test/extended/util"
1111
)
1212

13-
// This test is [Serial] because it modifies the cluster/machineconfigurations.operator.openshift.io object in each test.
14-
var _ = g.Describe("[Suite:openshift/machine-config-operator/disruptive][Suite:openshift/conformance/serial][sig-mco][OCPFeatureGate:ManagedBootImagesAWS][Serial]", func() {
13+
// These tests are `Serial` because they all modify the cluster/machineconfigurations.operator.openshift.io object.
14+
var _ = g.Describe("[sig-mco][OCPFeatureGate:ManagedBootImagesAWS][Serial]", func() {
1515
defer g.GinkgoRecover()
1616
var (
1717
MCOMachineConfigurationBaseDir = exutil.FixturePath("testdata", "machine_config", "machineconfigurations")

test/extended/machine_config/boot_image_update_gcp.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import (
1010
exutil "github.com/openshift/origin/test/extended/util"
1111
)
1212

13-
// This test is [Serial] because it modifies the cluster/machineconfigurations.operator.openshift.io object in each test.
14-
var _ = g.Describe("[Suite:openshift/machine-config-operator/disruptive][Suite:openshift/conformance/serial][sig-mco][OCPFeatureGate:ManagedBootImages][Serial]", func() {
13+
// These tests are `Serial` because they all modify the cluster/machineconfigurations.operator.openshift.io object.
14+
var _ = g.Describe("[sig-mco][OCPFeatureGate:ManagedBootImages][Serial]", func() {
1515
defer g.GinkgoRecover()
1616
var (
1717
MCOMachineConfigurationBaseDir = exutil.FixturePath("testdata", "machine_config", "machineconfigurations")

test/extended/machine_config/machine_config_node.go

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const (
2929
arbiter = "arbiter"
3030
)
3131

32-
var _ = g.Describe("[Suite:openshift/machine-config-operator/disruptive][sig-mco][OCPFeatureGate:MachineConfigNodes]", func() {
32+
var _ = g.Describe("[sig-mco][OCPFeatureGate:MachineConfigNodes]", func() {
3333
defer g.GinkgoRecover()
3434
var (
3535
MCOMachineConfigPoolBaseDir = exutil.FixturePath("testdata", "machine_config", "machineconfigpool")
@@ -52,48 +52,53 @@ var _ = g.Describe("[Suite:openshift/machine-config-operator/disruptive][sig-mco
5252
}
5353
})
5454

55-
g.It("[Suite:openshift/conformance/parallel]Should have MCN properties matching associated node properties for nodes in default MCPs [apigroup:machineconfiguration.openshift.io]", func() {
55+
// The following 3 tests are `Parallel` because they do not make any changes to the cluster and run quickly (< 5 min).
56+
g.It("Should have MCN properties matching associated node properties for nodes in default MCPs [apigroup:machineconfiguration.openshift.io]", func() {
5657
ValidateMCNPropertiesByMCPs(oc)
5758
})
5859

59-
g.It("[Suite:openshift/conformance/serial][Serial]Should have MCN properties matching associated node properties for nodes in custom MCPs [apigroup:machineconfiguration.openshift.io]", func() {
60+
g.It("Should properly block MCN updates from a MCD that is not the associated one [apigroup:machineconfiguration.openshift.io]", func() {
61+
ValidateMCNScopeSadPathTest(oc)
62+
})
63+
64+
g.It("Should properly block MCN updates by impersonation of the MCD SA [apigroup:machineconfiguration.openshift.io]", func() {
65+
ValidateMCNScopeImpersonationPathTest(oc)
66+
})
67+
68+
// The following 3 tests are `Serial` because they makes changes to the cluster that can impact other tests, but still run quickly (< 5 min).
69+
g.It("[Serial]Should have MCN properties matching associated node properties for nodes in custom MCPs [apigroup:machineconfiguration.openshift.io]", func() {
6070
skipOnSingleNodeTopology(oc) //skip this test for SNO
6171
skipOnTwoNodeTopology(oc) //skip this test for two-node openshift
6272
ValidateMCNPropertiesCustomMCP(oc, infraMCPFixture)
6373
})
6474

65-
g.It("[Suite:openshift/conformance/serial][Serial]Should properly transition through MCN conditions on rebootless node update [apigroup:machineconfiguration.openshift.io]", func() {
75+
g.It("[Serial]Should properly transition through MCN conditions on rebootless node update [apigroup:machineconfiguration.openshift.io]", func() {
6676
if IsSingleNode(oc) {
6777
ValidateMCNConditionTransitionsOnRebootlessUpdateSNO(oc, nodeDisruptionFixture, nodeDisruptionEmptyFixture, masterMCFixture)
6878
} else {
6979
ValidateMCNConditionTransitionsOnRebootlessUpdate(oc, nodeDisruptionFixture, nodeDisruptionEmptyFixture, customMCFixture, infraMCPFixture)
7080
}
7181
})
7282

73-
g.It("[Serial][Slow]Should properly report MCN conditions on node degrade [apigroup:machineconfiguration.openshift.io]", func() {
83+
g.It("[Serial]Should properly update the MCN from the associated MCD [apigroup:machineconfiguration.openshift.io]", func() {
84+
ValidateMCNScopeHappyPathTest(oc)
85+
})
86+
87+
// This test is `Disruptive` because it degrades a node.
88+
g.It("[Suite:openshift/machine-config-operator/disruptive][Disruptive]Should properly report MCN conditions on node degrade [apigroup:machineconfiguration.openshift.io]", func() {
7489
if IsSingleNode(oc) { //handle SNO clusters
7590
ValidateMCNConditionOnNodeDegrade(oc, invalidMasterMCFixture, true)
7691
} else { //handle standard, non-SNO, clusters
7792
ValidateMCNConditionOnNodeDegrade(oc, invalidWorkerMCFixture, false)
7893
}
7994
})
8095

81-
g.It("[Serial][Slow]Should properly create and remove MCN on node creation and deletion [apigroup:machineconfiguration.openshift.io]", func() {
96+
// This test is `Disruptive` because it creates and removes a node. It is also considered `Slow` because it takes longer than 5 min to run.
97+
g.It("[Suite:openshift/machine-config-operator/disruptive][Disruptive][Slow]Should properly create and remove MCN on node creation and deletion [apigroup:machineconfiguration.openshift.io]", func() {
8298
skipOnSingleNodeTopology(oc) //skip this test for SNO
8399
ValidateMCNOnNodeCreationAndDeletion(oc)
84100
})
85101

86-
g.It("[Suite:openshift/conformance/parallel]Should properly block MCN updates from a MCD that is not the associated one [apigroup:machineconfiguration.openshift.io]", func() {
87-
ValidateMCNScopeSadPathTest(oc)
88-
})
89-
90-
g.It("[Suite:openshift/conformance/parallel]Should properly block MCN updates by impersonation of the MCD SA [apigroup:machineconfiguration.openshift.io]", func() {
91-
ValidateMCNScopeImpersonationPathTest(oc)
92-
})
93-
94-
g.It("[Suite:openshift/conformance/serial][Serial]Should properly update the MCN from the associated MCD [apigroup:machineconfiguration.openshift.io]", func() {
95-
ValidateMCNScopeHappyPathTest(oc)
96-
})
97102
})
98103

99104
// `ValidateMCNPropertiesByMCPs` checks that MCN properties match the corresponding node properties

test/extended/machine_config/pinnedimages.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ var (
3232
customConfigPrefix = "rendered-custom"
3333
)
3434

35-
// This test is [Serial] because it modifies the state of the images present on Node in each test.
36-
var _ = g.Describe("[Suite:openshift/machine-config-operator/disruptive][Suite:openshift/conformance/serial][sig-mco][OCPFeatureGate:PinnedImages][OCPFeatureGate:MachineConfigNodes][Serial]", func() {
35+
// These tests are `Disruptive` because they result in disruptive actions in the cluster, including node reboots and degrades and pod creations and deletions.
36+
var _ = g.Describe("[Suite:openshift/machine-config-operator/disruptive][sig-mco][OCPFeatureGate:PinnedImages][Disruptive]", func() {
3737
defer g.GinkgoRecover()
3838
var (
3939
MCOPinnedImageBaseDir = exutil.FixturePath("testdata", "machine_config", "pinnedimage")
@@ -63,7 +63,8 @@ var _ = g.Describe("[Suite:openshift/machine-config-operator/disruptive][Suite:o
6363
}
6464
})
6565

66-
g.It("All Nodes in a custom Pool should have the PinnedImages even after Garbage Collection [apigroup:machineconfiguration.openshift.io]", func() {
66+
// This test is also considered `Slow` because it takes longer than 5 minutes to run.
67+
g.It("[Slow]All Nodes in a custom Pool should have the PinnedImages even after Garbage Collection [apigroup:machineconfiguration.openshift.io]", func() {
6768
// Skip this test on single node and two-node platforms since custom MCPs are not supported
6869
// for clusters with only a master MCP
6970
skipOnSingleNodeTopology(oc)

0 commit comments

Comments
 (0)