Skip to content

Commit d98db2f

Browse files
committed
e2e: update boot image tests
1 parent 604c1da commit d98db2f

File tree

4 files changed

+29
-11
lines changed

4 files changed

+29
-11
lines changed

test/extended-priv/mco_bootimages.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ var _ = g.Describe("[sig-mco][Suite:openshift/machine-config-operator/longdurati
6060

6161
})
6262

63-
g.It("[PolarionID:81403][OTP] In BootImages Machineset should update by default", g.Label("Platform:aws", "Platform:gcp"), func() {
63+
g.It("[PolarionID:81403][OTP] In BootImages Machineset should update by default", g.Label("Platform:aws", "Platform:gcp", "Platform:vsphere", "Platform:azure"), func() {
6464

6565
// Not supported in Vsphere
66-
skipTestIfSupportedPlatformNotMatched(oc, GCPPlatform, AWSPlatform)
66+
skipTestIfSupportedPlatformNotMatched(oc, GCPPlatform, AWSPlatform, VspherePlatform, AzurePlatform)
6767

6868
var (
6969
duplicatedMachinesetName = fmt.Sprintf("cloned-tc-%s", GetCurrentTestPolarionIDNumber())
@@ -471,10 +471,10 @@ var _ = g.Describe("[sig-mco][Suite:openshift/machine-config-operator/longdurati
471471
testUserDataUpdateFailure(oc, clonedMSName, clonedSecretName, expectedFailedMessageRegexp, setWrongIgnitionVersion)
472472
})
473473

474-
g.It("[PolarionID:81395][OTP] Verify in boot-image by default update is opt-in", g.Label("Platform:aws", "Platform:gcp"), func() {
474+
g.It("[PolarionID:81395][OTP] Verify in boot-image by default update is opt-in", g.Label("Platform:aws", "Platform:gcp", "Platform:vsphere", "Platform:azure"), func() {
475475

476476
// Not supported in Vsphere
477-
skipTestIfSupportedPlatformNotMatched(oc, GCPPlatform, AWSPlatform)
477+
skipTestIfSupportedPlatformNotMatched(oc, GCPPlatform, AWSPlatform, VspherePlatform, AzurePlatform)
478478

479479
exutil.By("To check the default opt-in in machieconfiguration")
480480
if !strings.Contains(machineConfiguration.GetSpecOrFail(), "managedBootImages") {

test/extended-priv/mco_bootimages_skew.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ var _ = g.Describe("[sig-mco][Suite:openshift/machine-config-operator/disruptive
8989
})
9090

9191
g.It("Verify Automatic mode and Upgradeable (Happy Case) [apigroup:machineconfiguration.openshift.io]", func() {
92-
// only applicable on GCP, AWS clusters
93-
skipTestIfSupportedPlatformNotMatched(oc, GCPPlatform, AWSPlatform)
92+
// only applicable on clusters where we support automatic updates: GCP, AWS, Azure and vSphere
93+
skipTestIfSupportedPlatformNotMatched(oc, GCPPlatform, AWSPlatform, AzurePlatform, VspherePlatform)
9494

9595
// No opinion on skew enforcement for these platforms will result in Automatic mode
9696
o.Expect(machineConfiguration.RemoveSkew()).To(o.Succeed())
@@ -124,7 +124,7 @@ var _ = g.Describe("[sig-mco][Suite:openshift/machine-config-operator/disruptive
124124
})
125125

126126
g.It("Verify Automatic mode and Upgradeable (Sad Case) [apigroup:machineconfiguration.openshift.io]", func(_ context.Context) {
127-
// only applicable on clustres where we support automatic updates: A
127+
// only applicable on clusters where we support automatic updates: GCP, AWS, Azure and vSphere
128128
skipTestIfSupportedPlatformNotMatched(oc, GCPPlatform, AWSPlatform, AzurePlatform, VspherePlatform)
129129

130130
// No opinion on skew enforcement for these platforms will result in Automatic mode
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
apiVersion: template.openshift.io/v1
2+
kind: Template
3+
metadata:
4+
name: skewenforcement-none
5+
objects:
6+
- apiVersion: operator.openshift.io/v1
7+
kind: MachineConfiguration
8+
metadata:
9+
name: cluster
10+
namespace: openshift-machine-config-operator
11+
spec:
12+
logLevel: Normal
13+
operatorLogLevel: Normal
14+
bootImageSkewEnforcement:
15+
mode: None

test/extended/boot_image_update_azure.go

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,11 @@ import (
2121
var _ = g.Describe("[sig-mco][Suite:openshift/machine-config-operator/disruptive][Serial][OCPFeatureGate:ManagedBootImagesAzure]", g.Label("Platform:azure"), g.Ordered, func() {
2222
defer g.GinkgoRecover()
2323
var (
24-
AllMachineSetFixture = filepath.Join("machineconfigurations", "managedbootimages-all.yaml")
25-
NoneMachineSetFixture = filepath.Join("machineconfigurations", "managedbootimages-none.yaml")
26-
PartialMachineSetFixture = filepath.Join("machineconfigurations", "managedbootimages-partial.yaml")
27-
EmptyMachineSetFixture = filepath.Join("machineconfigurations", "managedbootimages-empty.yaml")
24+
AllMachineSetFixture = filepath.Join("machineconfigurations", "managedbootimages-all.yaml")
25+
NoneMachineSetFixture = filepath.Join("machineconfigurations", "managedbootimages-none.yaml")
26+
PartialMachineSetFixture = filepath.Join("machineconfigurations", "managedbootimages-partial.yaml")
27+
EmptyMachineSetFixture = filepath.Join("machineconfigurations", "managedbootimages-empty.yaml")
28+
SkewEnforcementDisabledFixture = filepath.Join("machineconfigurations", "skewenforcement-disabled.yaml")
2829

2930
oc = exutil.NewCLI("mco-bootimage", exutil.KubeConfigPath()).AsAdmin()
3031
)
@@ -36,6 +37,8 @@ var _ = g.Describe("[sig-mco][Suite:openshift/machine-config-operator/disruptive
3637
skipUnlessFunctionalMachineAPI(oc)
3738
// Skip this test on single node platforms
3839
exutil.SkipOnSingleNodeTopology(oc)
40+
// Disable boot image skew enforcement
41+
applyMachineConfigurationFixture(oc, SkewEnforcementDisabledFixture)
3942
})
4043

4144
g.AfterEach(func() {

0 commit comments

Comments
 (0)