NO-ISSUE: Add ocs operator unit test for standard deployment mode
@@ -1051,6 +1051,39 @@ var _ = Describe("Ocs Operator use-cases", func() {
}),
errorExpected: false,
},
+ {
+ name: "ocs enabled, 6 nodes with 3 worker nodes for standard deployment",
+ srcState: models.ClusterStatusReady,
+ dstState: models.ClusterStatusReady,
+ machineNetworkCidr: "1.2.3.0/24",
+ apiVip: "1.2.3.5",
+ ingressVip: "1.2.3.6",
+ dnsDomain: "test.com",
+ pullSecretSet: true,
+ hosts: []models.Host{
+ {ID: &hid1, Status: swag.String(models.HostStatusKnown), Inventory: defaultInventory(), Role: models.HostRoleMaster},
+ {ID: &hid2, Status: swag.String(models.HostStatusKnown), Inventory: defaultInventory(), Role: models.HostRoleMaster},
+ {ID: &hid3, Status: swag.String(models.HostStatusKnown), Inventory: defaultInventory(), Role: models.HostRoleMaster},
+ {ID: &hid4, Status: swag.String(models.HostStatusKnown), Inventory: ocsInventoryWithDisks(10, 32000000000), Role: models.HostRoleWorker},
+ {ID: &hid5, Status: swag.String(models.HostStatusKnown), Inventory: ocsInventoryWithDisks(10, 32000000000), Role: models.HostRoleWorker},
+ {ID: &hid6, Status: swag.String(models.HostStatusKnown), Inventory: ocsInventoryWithDisks(10, 32000000000), Role: models.HostRoleWorker},
+ },
+ statusInfoChecker: makeValueChecker(clust.StatusInfoReady),
+ validationsChecker: makeJsonChecker(map[clust.ValidationID]validationCheckResult{
+ clust.IsMachineCidrDefined: {status: clust.ValidationSuccess, messagePattern: "The Machine Network CIDR is defined"},
+ clust.IsMachineCidrEqualsToCalculatedCidr: {status: clust.ValidationSuccess, messagePattern: "The Cluster Machine CIDR is equivalent to the calculated CIDR"},
+ clust.IsApiVipDefined: {status: clust.ValidationSuccess, messagePattern: "The API virtual IP is defined"},
+ clust.IsApiVipValid: {status: clust.ValidationSuccess, messagePattern: "belongs to the Machine CIDR and is not in use."},
+ clust.IsIngressVipDefined: {status: clust.ValidationSuccess, messagePattern: "The Ingress virtual IP is defined"},
+ clust.IsIngressVipValid: {status: clust.ValidationSuccess, messagePattern: "belongs to the Machine CIDR and is not in use."},
+ clust.AllHostsAreReadyToInstall: {status: clust.ValidationSuccess, messagePattern: "All hosts in the cluster are ready to install"},
+ clust.IsDNSDomainDefined: {status: clust.ValidationSuccess, messagePattern: "The base domain is defined"},
+ clust.IsPullSecretSet: {status: clust.ValidationSuccess, messagePattern: "The pull secret is set"},
+ clust.SufficientMastersCount: {status: clust.ValidationSuccess, messagePattern: "The cluster has a sufficient number of master candidates."},
+ clust.IsOcsRequirementsSatisfied: {status: clust.ValidationSuccess, messagePattern: "OCS Requirements for Standard Deployment are satisfied"},
+ }),
+ errorExpected: false,
+ },
}
for i := range tests {
