Skip to content

Commit 0bf1c6b

Browse files
Zoltan SzaboZoltan Szabo
Zoltan Szabo
authored and
Zoltan Szabo
committed
ACM-19143: removed obsolete image versions from subsystem test
1 parent dc2d35a commit 0bf1c6b

13 files changed

+108
-426
lines changed

docs/hive-integration/crds/agentClusterInstall-with-installconfig-overrides.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ spec:
1212
clusterDeploymentRef:
1313
name: test-cluster
1414
imageSetRef:
15-
name: openshift-v4.9.0
15+
name: openshift-v4.16.0
1616
ingressVIP: 1.2.3.9
1717
ingressVIPs:
1818
- 1.2.3.9

docs/hive-integration/crds/agentClusterInstall.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ spec:
1010
clusterDeploymentRef:
1111
name: test-cluster
1212
imageSetRef:
13-
name: openshift-v4.9.0
13+
name: openshift-v4.16.0
1414
ingressVIP: 1.2.3.9
1515
ingressVIPs:
1616
- 1.2.3.9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: hive.openshift.io/v1
22
kind: ClusterImageSet
33
metadata:
4-
name: openshift-v4.15.0
4+
name: openshift-v4.16.0
55
spec:
6-
releaseImage: quay.io/openshift-release-dev/ocp-release:4.15.0-x86_64
6+
releaseImage: quay.io/openshift-release-dev/ocp-release:4.16.0-x86_64

subsystem/agent_based_installer_client_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ var _ = Describe("RegisterClusterAndInfraEnv", func() {
2727
Expect(registerClusterErr).NotTo(HaveOccurred())
2828
Expect(network.GetApiVipById(&common.Cluster{Cluster: *modelCluster}, 0)).To(Equal("1.2.3.8"))
2929
Expect(network.GetIngressVipById(&common.Cluster{Cluster: *modelCluster}, 0)).To(Equal("1.2.3.9"))
30-
Expect(modelCluster.OpenshiftVersion).To(ContainSubstring("4.15.0"))
30+
Expect(modelCluster.OpenshiftVersion).To(ContainSubstring("4.16.0"))
3131
Expect(modelCluster.CPUArchitecture).To(Equal("x86_64"))
3232
Expect(modelCluster.Name).To(Equal("test-cluster"))
3333

@@ -49,7 +49,7 @@ var _ = Describe("RegisterClusterAndInfraEnv", func() {
4949
Expect(registerClusterErr).NotTo(HaveOccurred())
5050
Expect(network.GetApiVipById(&common.Cluster{Cluster: *modelCluster}, 0)).To(Equal("1.2.3.8"))
5151
Expect(network.GetIngressVipById(&common.Cluster{Cluster: *modelCluster}, 0)).To(Equal("1.2.3.9"))
52-
Expect(modelCluster.OpenshiftVersion).To(ContainSubstring("4.15.0"))
52+
Expect(modelCluster.OpenshiftVersion).To(ContainSubstring("4.16.0"))
5353
Expect(modelCluster.CPUArchitecture).To(Equal("x86_64"))
5454
Expect(modelCluster.InstallConfigOverrides).To(Equal(`{"fips": true}`))
5555
Expect(modelCluster.Name).To(Equal("test-cluster"))

subsystem/cluster_test.go

+42-252
Large diffs are not rendered by default.

subsystem/cluster_v2_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ var _ = Describe("[V2ClusterTests] multiarch", func() {
541541
clusterReq, err := utils_test.TestContext.User2BMClient.Installer.V2RegisterCluster(ctx, &installer.V2RegisterClusterParams{
542542
NewClusterParams: &models.ClusterCreateParams{
543543
Name: swag.String("test-cluster"),
544-
OpenshiftVersion: swag.String("4.12-multi"),
544+
OpenshiftVersion: swag.String("4.16-multi"),
545545
PullSecret: swag.String(fmt.Sprintf(psTemplate, utils_test.FakePS2)),
546546
BaseDNSDomain: "example.com",
547547
UserManagedNetworking: swag.Bool(true),
@@ -580,7 +580,7 @@ var _ = Describe("[V2ClusterTests] multiarch", func() {
580580
_, err := utils_test.TestContext.UserBMClient.Installer.RegisterInfraEnv(context.Background(), &installer.RegisterInfraEnvParams{
581581
InfraenvCreateParams: &models.InfraEnvCreateParams{
582582
Name: swag.String("test-infra-env"),
583-
OpenshiftVersion: "4.12",
583+
OpenshiftVersion: "4.16",
584584
PullSecret: swag.String(pullSecret),
585585
SSHAuthorizedKey: swag.String(utils_test.SshPublicKey),
586586
ImageType: models.ImageTypeMinimalIso,

subsystem/feature_support_levels_test.go

+25-37
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ var _ = Describe("Feature support levels API", func() {
102102
})
103103

104104
Context("Update cluster", func() {
105-
It("Update umn true won't fail on 4.13 with multi release without infra-env", func() {
106-
cluster, err := registerNewCluster("4.13-multi", common.MultiCPUArchitecture, models.ClusterHighAvailabilityModeFull, swag.Bool(true))
105+
It("Update umn true won't fail with multi release without infra-env", func() {
106+
cluster, err := registerNewCluster("4.16-multi", common.MultiCPUArchitecture, models.ClusterHighAvailabilityModeFull, swag.Bool(true))
107107
Expect(err).NotTo(HaveOccurred())
108108
Expect(cluster.Payload.CPUArchitecture).To(Equal(common.MultiCPUArchitecture))
109109

@@ -116,13 +116,13 @@ var _ = Describe("Feature support levels API", func() {
116116
Expect(err).NotTo(HaveOccurred())
117117
})
118118

119-
It("Update umn true fail on 4.13 with s390x with infra-env", func() {
120-
expectedError := "cannot use Cluster Managed Networking because it's not compatible with the s390x architecture on version 4.13"
121-
cluster, err := registerNewCluster("4.13-multi", common.S390xCPUArchitecture, models.ClusterHighAvailabilityModeFull, swag.Bool(true))
119+
It("Update umn true fail with s390x with infra-env", func() {
120+
expectedError := "cannot use Cluster Managed Networking because it's not compatible with the s390x architecture on version 4.16"
121+
cluster, err := registerNewCluster("4.16-multi", common.S390xCPUArchitecture, models.ClusterHighAvailabilityModeFull, swag.Bool(true))
122122
Expect(err).NotTo(HaveOccurred())
123123
Expect(cluster.Payload.CPUArchitecture).To(Equal(common.MultiCPUArchitecture))
124124

125-
infraEnv, err := registerNewInfraEnv(cluster.Payload.ID, "4.13", "s390x")
125+
infraEnv, err := registerNewInfraEnv(cluster.Payload.ID, "4.16", "s390x")
126126
Expect(err).NotTo(HaveOccurred())
127127
Expect(infraEnv.Payload.CPUArchitecture).To(Equal("s390x"))
128128

@@ -138,8 +138,8 @@ var _ = Describe("Feature support levels API", func() {
138138
})
139139

140140
It("Create infra-env after updating OLM operators on s390x architecture ", func() {
141-
expectedError := "cannot use OpenShift Virtualization because it's not compatible with the s390x architecture on version 4.13"
142-
cluster, err := registerNewCluster("4.13-multi", common.S390xCPUArchitecture, models.ClusterHighAvailabilityModeFull, swag.Bool(true))
141+
expectedError := "cannot use OpenShift Virtualization because it's not compatible with the s390x architecture on version 4.16"
142+
cluster, err := registerNewCluster("4.16-multi", common.S390xCPUArchitecture, models.ClusterHighAvailabilityModeFull, swag.Bool(true))
143143
Expect(err).NotTo(HaveOccurred())
144144
Expect(cluster.Payload.CPUArchitecture).To(Equal(common.MultiCPUArchitecture))
145145

@@ -155,13 +155,13 @@ var _ = Describe("Feature support levels API", func() {
155155
})
156156
Expect(err).ToNot(HaveOccurred())
157157

158-
_, err = registerNewInfraEnv(cluster.Payload.ID, "4.13", "s390x")
158+
_, err = registerNewInfraEnv(cluster.Payload.ID, "4.16", "s390x")
159159
err2 := err.(*installer.RegisterInfraEnvBadRequest)
160160
ExpectWithOffset(1, *err2.Payload.Reason).To(ContainSubstring(expectedError))
161161
})
162162
Context("UpdateInfraEnv", func() {
163163
It("Update ppc64le infra env minimal iso without cluster", func() {
164-
infraEnv, err := registerNewInfraEnv(nil, "4.12", models.ClusterCPUArchitecturePpc64le)
164+
infraEnv, err := registerNewInfraEnv(nil, "4.16", models.ClusterCPUArchitecturePpc64le)
165165
Expect(err).ToNot(HaveOccurred())
166166
Expect(common.ImageTypeValue(infraEnv.Payload.Type)).ToNot(Equal(models.ImageTypeMinimalIso))
167167

@@ -174,10 +174,10 @@ var _ = Describe("Feature support levels API", func() {
174174
Expect(common.ImageTypeValue(updatedInfraEnv.Payload.Type)).To(Equal(models.ImageTypeMinimalIso))
175175
})
176176
It("Update ppc64le infra env minimal iso with cluster", func() {
177-
cluster, err := registerNewCluster("4.12", models.ClusterCPUArchitecturePpc64le, models.ClusterHighAvailabilityModeFull, swag.Bool(true))
177+
cluster, err := registerNewCluster("4.16", models.ClusterCPUArchitecturePpc64le, models.ClusterHighAvailabilityModeFull, swag.Bool(true))
178178
Expect(err).NotTo(HaveOccurred())
179179

180-
infraEnv, err := registerNewInfraEnv(cluster.Payload.ID, "4.12", models.ClusterCPUArchitecturePpc64le)
180+
infraEnv, err := registerNewInfraEnv(cluster.Payload.ID, "4.16", models.ClusterCPUArchitecturePpc64le)
181181
Expect(err).ToNot(HaveOccurred())
182182
Expect(common.ImageTypeValue(infraEnv.Payload.Type)).ToNot(Equal(models.ImageTypeMinimalIso))
183183

@@ -190,10 +190,10 @@ var _ = Describe("Feature support levels API", func() {
190190
Expect(common.ImageTypeValue(updatedInfraEnv.Payload.Type)).To(Equal(models.ImageTypeMinimalIso))
191191
})
192192
It("Update s390x infra env minimal iso with cluster - fail", func() {
193-
cluster, err := registerNewCluster("4.12", "s390x", models.ClusterHighAvailabilityModeFull, swag.Bool(true))
193+
cluster, err := registerNewCluster("4.16", "s390x", models.ClusterHighAvailabilityModeFull, swag.Bool(true))
194194
Expect(err).NotTo(HaveOccurred())
195195

196-
infraEnv, err := registerNewInfraEnv(cluster.Payload.ID, "4.12", models.ClusterCPUArchitectureS390x)
196+
infraEnv, err := registerNewInfraEnv(cluster.Payload.ID, "4.16", models.ClusterCPUArchitectureS390x)
197197
Expect(err).ToNot(HaveOccurred())
198198
Expect(common.ImageTypeValue(infraEnv.Payload.Type)).ToNot(Equal(models.ImageTypeMinimalIso))
199199

@@ -204,44 +204,32 @@ var _ = Describe("Feature support levels API", func() {
204204
}})
205205
Expect(err).To(HaveOccurred())
206206
err2 := err.(*installer.UpdateInfraEnvBadRequest)
207-
ExpectWithOffset(1, *err2.Payload.Reason).To(ContainSubstring("cannot use Minimal ISO because it's not compatible with the s390x architecture on version 4.12"))
207+
ExpectWithOffset(1, *err2.Payload.Reason).To(ContainSubstring("cannot use Minimal ISO because it's not compatible with the s390x architecture on version 4.16"))
208208
})
209209
})
210210
})
211211

212212
Context("Register cluster", func() {
213-
It("Register cluster won't fail on 4.13 with s390x", func() {
214-
cluster, err := registerNewCluster("4.13", "s390x", models.ClusterHighAvailabilityModeFull, swag.Bool(true))
213+
It("Register cluster won't fail with s390x", func() {
214+
cluster, err := registerNewCluster("4.16", "s390x", models.ClusterHighAvailabilityModeFull, swag.Bool(true))
215215
Expect(err).NotTo(HaveOccurred())
216216
Expect(cluster.Payload.CPUArchitecture).To(Equal(common.S390xCPUArchitecture))
217217
})
218218

219-
It("Register cluster won't fail on 4.13 with s390x without UMN", func() {
220-
cluster, err := registerNewCluster("4.13", "s390x", models.ClusterHighAvailabilityModeFull, nil)
219+
It("Register cluster won't fail with s390x without UMN", func() {
220+
cluster, err := registerNewCluster("4.16", "s390x", models.ClusterHighAvailabilityModeFull, nil)
221221
Expect(err).NotTo(HaveOccurred())
222222
Expect(cluster.Payload.CPUArchitecture).To(Equal(common.S390xCPUArchitecture))
223223
})
224-
225-
It("SNO with s390x 4.10 fails on architecture- failure", func() {
226-
expectedError := "Requested CPU architecture s390x is not available"
227-
_, err := registerNewCluster("4.10", "s390x", models.ClusterHighAvailabilityModeNone, swag.Bool(true))
228-
Expect(err).To(HaveOccurred())
229-
err2 := err.(*installer.V2RegisterClusterBadRequest)
230-
ExpectWithOffset(1, *err2.Payload.Reason).To(ContainSubstring(expectedError))
231-
})
232-
It("SNO with s390x fails on SNO isn't compatible with architecture success on 4.13", func() {
233-
cluster, err := registerNewCluster("4.13", "s390x", models.ClusterHighAvailabilityModeNone, nil)
224+
It("Register SNO cluster won't fail with s390x", func() {
225+
cluster, err := registerNewCluster("4.16", "s390x", models.ClusterHighAvailabilityModeNone, swag.Bool(true))
234226
Expect(err).NotTo(HaveOccurred())
235227
Expect(cluster.Payload.CPUArchitecture).To(Equal(common.S390xCPUArchitecture))
236-
Expect(swag.StringValue(cluster.Payload.HighAvailabilityMode)).To(Equal(models.ClusterHighAvailabilityModeNone))
237-
238228
})
239-
It("SNO with s390x fails on SNO isn't compatible with architecture on 4.12 - failure", func() {
240-
expectedError := "cannot use Single Node OpenShift because it's not compatible with the s390x architecture on version 4.12"
241-
_, err := registerNewCluster("4.12", "s390x", models.ClusterHighAvailabilityModeNone, swag.Bool(true))
242-
Expect(err).To(HaveOccurred())
243-
err2 := err.(*installer.V2RegisterClusterBadRequest)
244-
ExpectWithOffset(1, *err2.Payload.Reason).To(ContainSubstring(expectedError))
229+
It("Register SNO cluster won't fail with s390x without UMN", func() {
230+
cluster, err := registerNewCluster("4.16", "s390x", models.ClusterHighAvailabilityModeNone, nil)
231+
Expect(err).NotTo(HaveOccurred())
232+
Expect(cluster.Payload.CPUArchitecture).To(Equal(common.S390xCPUArchitecture))
245233
})
246234
}) // Register cluster
247235

subsystem/host_test.go

+2-66
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package subsystem
33
import (
44
"context"
55
"encoding/json"
6-
"fmt"
76
"time"
87

98
"github.com/go-openapi/strfmt"
@@ -30,9 +29,9 @@ var _ = Describe("Host tests", func() {
3029
cluster, err = utils_test.TestContext.UserBMClient.Installer.V2RegisterCluster(ctx, &installer.V2RegisterClusterParams{
3130
NewClusterParams: &models.ClusterCreateParams{
3231
Name: swag.String("test-cluster"),
33-
OpenshiftVersion: swag.String(VipAutoAllocOpenshiftVersion),
32+
OpenshiftVersion: swag.String(defaultOpenshiftVersion),
3433
PullSecret: swag.String(pullSecret),
35-
VipDhcpAllocation: swag.Bool(true),
34+
VipDhcpAllocation: swag.Bool(false),
3635
},
3736
})
3837
Expect(err).NotTo(HaveOccurred())
@@ -218,69 +217,6 @@ var _ = Describe("Host tests", func() {
218217
Expect(utils_test.IsStepTypeInList(steps, models.StepTypeContainerImageAvailability)).Should(BeTrue())
219218
})
220219

221-
It("next step - DHCP", func() {
222-
By("Creating cluster")
223-
Expect(db.Save(&models.MachineNetwork{ClusterID: clusterID, Cidr: "1.2.3.0/24"}).Error).ToNot(HaveOccurred())
224-
By("Creating hosts")
225-
host := &utils_test.TestContext.RegisterHost(*infraEnvID).Host
226-
host2 := &utils_test.TestContext.RegisterHost(*infraEnvID).Host
227-
Expect(db.Model(host2).UpdateColumns(&models.Host{Inventory: defaultInventory(),
228-
Status: swag.String(models.HostStatusInsufficient)}).Error).NotTo(HaveOccurred())
229-
By("Get steps in discovering ...")
230-
steps := utils_test.TestContext.GetNextSteps(*infraEnvID, *host.ID)
231-
Expect(utils_test.IsStepTypeInList(steps, models.StepTypeInventory)).Should(BeTrue())
232-
host = utils_test.TestContext.GetHostV2(*infraEnvID, *host.ID)
233-
By("Get steps in insufficient ...")
234-
Expect(db.Model(host).Update("status", "insufficient").Error).NotTo(HaveOccurred())
235-
Expect(db.Model(host).UpdateColumn("inventory", defaultInventory()).Error).NotTo(HaveOccurred())
236-
steps = utils_test.TestContext.GetNextSteps(*infraEnvID, *host.ID)
237-
Expect(utils_test.IsStepTypeInList(steps, models.StepTypeInventory)).Should(BeTrue())
238-
Expect(utils_test.IsStepTypeInList(steps, models.StepTypeFreeNetworkAddresses)).Should(BeTrue())
239-
Expect(utils_test.IsStepTypeInList(steps, models.StepTypeDhcpLeaseAllocate)).Should(BeTrue())
240-
Expect(utils_test.IsStepTypeInList(steps, models.StepTypeVerifyVips)).Should(BeFalse())
241-
Expect(db.Save(&models.APIVip{IP: "1.2.3.4", ClusterID: clusterID}).Error).ToNot(HaveOccurred())
242-
steps = utils_test.TestContext.GetNextSteps(*infraEnvID, *host.ID)
243-
Expect(utils_test.IsStepTypeInList(steps, models.StepTypeInventory)).Should(BeTrue())
244-
Expect(utils_test.IsStepTypeInList(steps, models.StepTypeFreeNetworkAddresses)).Should(BeTrue())
245-
Expect(utils_test.IsStepTypeInList(steps, models.StepTypeDhcpLeaseAllocate)).Should(BeTrue())
246-
Expect(utils_test.IsStepTypeInList(steps, models.StepTypeVerifyVips)).Should(BeTrue())
247-
By("Get steps in known ...")
248-
Expect(db.Model(host).Update("status", "known").Error).NotTo(HaveOccurred())
249-
steps = utils_test.TestContext.GetNextSteps(*infraEnvID, *host.ID)
250-
Expect(utils_test.IsStepTypeInList(steps, models.StepTypeConnectivityCheck)).Should(BeTrue())
251-
Expect(utils_test.IsStepTypeInList(steps, models.StepTypeFreeNetworkAddresses)).Should(BeTrue())
252-
Expect(utils_test.IsStepTypeInList(steps, models.StepTypeDhcpLeaseAllocate)).Should(BeTrue())
253-
Expect(utils_test.IsStepTypeInList(steps, models.StepTypeVerifyVips)).Should(BeTrue())
254-
By("Get steps in disabled ...")
255-
Expect(db.Model(host).Update("status", "disabled").Error).NotTo(HaveOccurred())
256-
steps = utils_test.TestContext.GetNextSteps(*infraEnvID, *host.ID)
257-
Expect(steps.NextInstructionSeconds).Should(Equal(int64(120)))
258-
Expect(len(steps.Instructions)).Should(Equal(0))
259-
By("Get steps in insufficient ...")
260-
Expect(db.Model(host).Update("status", "insufficient").Error).NotTo(HaveOccurred())
261-
steps = utils_test.TestContext.GetNextSteps(*infraEnvID, *host.ID)
262-
Expect(utils_test.IsStepTypeInList(steps, models.StepTypeConnectivityCheck)).Should(BeTrue())
263-
Expect(utils_test.IsStepTypeInList(steps, models.StepTypeDhcpLeaseAllocate)).Should(BeTrue())
264-
By("Get steps in error ...")
265-
Expect(db.Model(host).Update("status", "error").Error).NotTo(HaveOccurred())
266-
steps = utils_test.TestContext.GetNextSteps(*infraEnvID, *host.ID)
267-
Expect(utils_test.IsStepTypeInList(steps, models.StepTypeStopInstallation)).Should(BeTrue())
268-
By("Get steps in resetting ...")
269-
Expect(db.Model(host).Update("status", models.HostStatusResetting).Error).NotTo(HaveOccurred())
270-
steps = utils_test.TestContext.GetNextSteps(*infraEnvID, *host.ID)
271-
Expect(len(steps.Instructions)).Should(Equal(0))
272-
for _, st := range []string{models.HostStatusInstalling, models.HostStatusPreparingForInstallation} {
273-
By(fmt.Sprintf("Get steps in %s ...", st))
274-
Expect(db.Model(host).Update("status", st).Error).NotTo(HaveOccurred())
275-
steps = utils_test.TestContext.GetNextSteps(*infraEnvID, *host.ID)
276-
Expect(utils_test.IsStepTypeInList(steps, models.StepTypeDhcpLeaseAllocate)).Should(BeTrue())
277-
}
278-
By(fmt.Sprintf("Get steps in %s ...", models.HostStatusInstallingInProgress))
279-
Expect(db.Model(host).Updates(map[string]interface{}{"status": models.HostStatusInstallingInProgress, "progress_stage_updated_at": strfmt.DateTime(time.Now())}).Error).NotTo(HaveOccurred())
280-
steps = utils_test.TestContext.GetNextSteps(*infraEnvID, *host.ID)
281-
Expect(utils_test.IsStepTypeInList(steps, models.StepTypeDhcpLeaseAllocate)).Should(BeTrue())
282-
})
283-
284220
It("host_disconnection", func() {
285221
host := &utils_test.TestContext.RegisterHost(*infraEnvID).Host
286222
Expect(db.Model(host).Update("status", "installing").Error).NotTo(HaveOccurred())

subsystem/infra_env_test.go

-1
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,6 @@ var _ = Describe("Infra_Env", func() {
361361
Expect(contents).To(ContainSubstring("eth0"))
362362
},
363363
Entry("ocp versions greater than/ equal to MinimalVersionForNmstatectl", common.MinimalVersionForNmstatectl),
364-
Entry("ocp versions less than MinimalVersionForNmstatectl", "4.12"),
365364
)
366365

367366
It("download infra-env files invalid filename option", func() {

subsystem/kubeapi/kubeapi_suite_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import (
3232
var log *logrus.Logger
3333
var wiremock *utils_test.WireMock
3434
var kubeClient k8sclient.Client
35-
var VipAutoAllocOpenshiftVersion string = "4.14.0"
35+
var VipAutoAllocOpenshiftVersion string = "4.16.0"
3636
var pullSecret = "{\"auths\":{\"cloud.openshift.com\":{\"auth\":\"dXNlcjpwYXNzd29yZAo=\",\"email\":\"[email protected]\"}}}" // #nosec
3737

3838
var Options struct {

0 commit comments

Comments
 (0)