@@ -5209,6 +5209,17 @@ var _ = Describe("cluster", func() {
52095209 })
52105210
52115211 Context("Multiple VIPs forbidden in update for pre-4.12", func() {
5212+ var pre412Version string
5213+
5214+ BeforeEach(func() {
5215+ v, ok := common.TestVersion().LessThan("4.12").Latest().TryVersion()
5216+ if !ok {
5217+ Skip("no test version available below 4.12")
5218+ }
5219+ pre412Version = v
5220+ Expect(db.Model(&common.Cluster{}).Where("id = ?", clusterID).Update("openshift_version", pre412Version).Error).ShouldNot(HaveOccurred())
5221+ })
5222+
52125223 It("2 APIVips and 2 IngressVips", func() {
52135224 apiVip := "8.8.8.7"
52145225 ingressVip := "8.8.8.1"
@@ -5223,7 +5234,7 @@ var _ = Describe("cluster", func() {
52235234 },
52245235 })
52255236
5226- verifyApiErrorString(reply, http.StatusBadRequest, "dual-stack VIPs are not supported in OpenShift 4.6" )
5237+ verifyApiErrorString(reply, http.StatusBadRequest, "dual-stack VIPs are not supported in OpenShift "+pre412Version )
52275238 })
52285239
52295240 It("2 APIVips and 1 IngressVips", func() {
@@ -5240,7 +5251,7 @@ var _ = Describe("cluster", func() {
52405251 },
52415252 })
52425253
5243- verifyApiErrorString(reply, http.StatusBadRequest, "dual-stack VIPs are not supported in OpenShift 4.6" )
5254+ verifyApiErrorString(reply, http.StatusBadRequest, "dual-stack VIPs are not supported in OpenShift "+pre412Version )
52445255 })
52455256
52465257 It("1 APIVip and 2 IngressVips", func() {
@@ -5257,7 +5268,7 @@ var _ = Describe("cluster", func() {
52575268 },
52585269 })
52595270
5260- verifyApiErrorString(reply, http.StatusBadRequest, "dual-stack VIPs are not supported in OpenShift 4.6" )
5271+ verifyApiErrorString(reply, http.StatusBadRequest, "dual-stack VIPs are not supported in OpenShift "+pre412Version )
52615272 })
52625273 })
52635274 })
@@ -5355,6 +5366,7 @@ var _ = Describe("cluster", func() {
53555366 ID: &clusterID,
53565367 APIVips: []*models.APIVip{{IP: "10.11.12.13"}},
53575368 IngressVips: []*models.IngressVip{{IP: "10.11.20.50"}},
5369+ CPUArchitecture: common.DefaultCPUArchitecture,
53585370 OpenshiftVersion: common.TestDefaultConfig.OpenShiftVersion,
53595371 Status: swag.String(models.ClusterStatusReady),
53605372 }}
@@ -5363,6 +5375,7 @@ var _ = Describe("cluster", func() {
53635375 ID: &clusterID,
53645376 APIVips: []*models.APIVip{{IP: "10.11.12.13"}},
53655377 IngressVips: []*models.IngressVip{{IP: "10.11.20.50"}},
5378+ CPUArchitecture: common.DefaultCPUArchitecture,
53665379 OpenshiftVersion: common.TestDefaultConfig.OpenShiftVersion,
53675380 Status: swag.String(models.ClusterStatusInstalling),
53685381 },
@@ -15102,8 +15115,8 @@ var _ = Describe("RegisterCluster", func() {
1510215115 Expect(result.Platform.None).Should(BeNil())
1510315116 Expect(result.Platform.Baremetal).Should(BeNil())
1510415117
15105- Expect(result.Platform.Vsphere.DeprecatedAPIVIP ).Should(Equal (apiVip))
15106- Expect(result.Platform.Vsphere.DeprecatedIngressVIP ).Should(Equal (ingressVip))
15118+ Expect(result.Platform.Vsphere.APIVIPs ).Should(ContainElement (apiVip))
15119+ Expect(result.Platform.Vsphere.IngressVIPs ).Should(ContainElement (ingressVip))
1510715120 })
1510815121 })
1510915122
@@ -17815,6 +17828,7 @@ var _ = Describe("AMS subscriptions", func() {
1781517828 err := db.Create(&common.Cluster{Cluster: models.Cluster{
1781617829 ID: &clusterID,
1781717830 OpenshiftVersion: common.TestDefaultConfig.OpenShiftVersion,
17831+ CPUArchitecture: common.DefaultCPUArchitecture,
1781817832 Status: swag.String(models.ClusterStatusReady),
1781917833 }}).Error
1782017834 Expect(err).ShouldNot(HaveOccurred())
0 commit comments