@@ -805,13 +805,13 @@ var _ = Describe("Reconcile", func() {
805
805
Name : clusterInstallName ,
806
806
}
807
807
_ , err := r .Reconcile (ctx , ctrl.Request {NamespacedName : key })
808
- Expect (err ).NotTo (HaveOccurred ())
808
+ Expect (err ).To (HaveOccurred ())
809
809
810
810
Expect (c .Get (ctx , key , clusterInstall )).To (Succeed ())
811
811
cond := findCondition (clusterInstall .Status .Conditions , hivev1 .ClusterInstallRequirementsMet )
812
812
Expect (cond ).NotTo (BeNil ())
813
813
Expect (cond .Status ).To (Equal (corev1 .ConditionFalse ))
814
- Expect (cond .Message ).To (Equal ("clusterDeployment with name ' test-cluster' in namespace ' test-namespace' not found " ))
814
+ Expect (cond .Message ).To (Equal ("failed to get ClusterDeployment test-namespace/ test-cluster " ))
815
815
})
816
816
817
817
It ("creates extra manifests" , func () {
@@ -962,13 +962,13 @@ var _ = Describe("Reconcile", func() {
962
962
res , err := r .Reconcile (ctx , req )
963
963
Expect (err ).To (HaveOccurred ())
964
964
Expect (err .Error ()).To (ContainSubstring ("already exists but is being deleted, probably leftover from previous installation" ))
965
- Expect (res ).To (Equal (ctrl. Result {} ))
965
+ Expect (res . RequeueAfter ).To (Equal (30 * time . Second ))
966
966
967
967
key := types.NamespacedName {
968
968
Namespace : clusterInstallNamespace ,
969
969
Name : clusterInstallName ,
970
970
}
971
- expectedReason := fmt . Sprintf ( "dataImage %s/%s already exists but is being deleted, probably leftover from previous installation" , bmh . Namespace , bmh . Name )
971
+ expectedReason := "previous DataImage is being deleted"
972
972
973
973
Expect (c .Get (ctx , key , clusterInstall )).To (Succeed ())
974
974
cond := findCondition (clusterInstall .Status .Conditions , hivev1 .ClusterInstallRequirementsMet )
@@ -1309,7 +1309,7 @@ var _ = Describe("Reconcile", func() {
1309
1309
cond := findCondition (clusterInstall .Status .Conditions , hivev1 .ClusterInstallRequirementsMet )
1310
1310
Expect (cond ).NotTo (BeNil ())
1311
1311
Expect (cond .Status ).To (Equal (corev1 .ConditionFalse ))
1312
- Expect (cond .Message ).To (Equal ("clusterDeploymentRef is unset" ))
1312
+ Expect (cond .Message ).To (Equal ("ClusterDeploymentRef is unset" ))
1313
1313
1314
1314
})
1315
1315
@@ -1330,8 +1330,8 @@ var _ = Describe("Reconcile", func() {
1330
1330
cond := findCondition (clusterInstall .Status .Conditions , hivev1 .ClusterInstallRequirementsMet )
1331
1331
Expect (cond ).NotTo (BeNil ())
1332
1332
Expect (cond .Status ).To (Equal (corev1 .ConditionFalse ))
1333
- Expect (cond .Reason ).To (Equal (v1alpha1 .HostValidationPending ))
1334
- Expect (cond .Message ).To (Equal ("No BareMetalHostRef set, nothing to do without provided bmh" ))
1333
+ Expect (cond .Reason ).To (Equal (v1alpha1 .ConfigurationNotReadyReason ))
1334
+ Expect (cond .Message ).To (Equal ("no BareMetalHostRef set, nothing to do without provided bmh" ))
1335
1335
})
1336
1336
1337
1337
It ("Set ClusterInstallRequirementsMet to false in case there is not actual bmh under the reference" , func () {
@@ -1351,14 +1351,14 @@ var _ = Describe("Reconcile", func() {
1351
1351
Name : clusterInstallName ,
1352
1352
}
1353
1353
_ , err := r .Reconcile (ctx , ctrl.Request {NamespacedName : key })
1354
- Expect (err ).NotTo (HaveOccurred ())
1354
+ Expect (err ).To (HaveOccurred ())
1355
1355
1356
1356
Expect (c .Get (ctx , key , clusterInstall )).To (Succeed ())
1357
1357
cond := findCondition (clusterInstall .Status .Conditions , hivev1 .ClusterInstallRequirementsMet )
1358
1358
Expect (cond ).NotTo (BeNil ())
1359
1359
Expect (cond .Status ).To (Equal (corev1 .ConditionFalse ))
1360
- Expect (cond .Reason ).To (Equal (v1alpha1 .HostValidationPending ))
1361
- Expect (cond .Message ).To (Equal ("baremetalhosts.metal3.io \" doesntExist \" not found " ))
1360
+ Expect (cond .Reason ).To (Equal (v1alpha1 .ConfigurationNotReadyReason ))
1361
+ Expect (cond .Message ).To (Equal ("failed to get BareMetalHost test-bmh-namespace/doesntExist " ))
1362
1362
})
1363
1363
1364
1364
It ("updates the cluster install and cluster deployment metadata" , func () {
@@ -1518,7 +1518,7 @@ var _ = Describe("Reconcile", func() {
1518
1518
Expect (infoOut .MachineNetwork [0 ].CIDR .String ()).To (Equal (clusterInstall .Spec .MachineNetwork ))
1519
1519
})
1520
1520
1521
- It ("in case there is no actual bmh under the reference we should not return error" , func () {
1521
+ It ("in case there is no actual bmh under the reference we should return error" , func () {
1522
1522
bmh := bmhInState (bmh_v1alpha1 .StateAvailable )
1523
1523
clusterInstall .Spec .BareMetalHostRef = & v1alpha1.BareMetalHostReference {
1524
1524
Name : bmh .Name ,
@@ -1535,7 +1535,7 @@ var _ = Describe("Reconcile", func() {
1535
1535
Name : clusterInstallName ,
1536
1536
}
1537
1537
_ , err := r .Reconcile (ctx , ctrl.Request {NamespacedName : key })
1538
- Expect (err ).ToNot (HaveOccurred ())
1538
+ Expect (err ).To (HaveOccurred ())
1539
1539
})
1540
1540
1541
1541
It ("reque in case bmh has no hw details but after adding them it succeeds" , func () {
@@ -1596,7 +1596,7 @@ var _ = Describe("Reconcile", func() {
1596
1596
cond = findCondition (clusterInstall .Status .Conditions , hivev1 .ClusterInstallRequirementsMet )
1597
1597
Expect (cond ).NotTo (BeNil ())
1598
1598
Expect (cond .Status ).To (Equal (corev1 .ConditionTrue ))
1599
- Expect (cond .Reason ).To (Equal (v1alpha1 .HostValidationSucceeded ))
1599
+ Expect (cond .Reason ).To (Equal (v1alpha1 .HostConfigurationSucceededReason ))
1600
1600
})
1601
1601
1602
1602
It ("fails in case bmh has no ip in provided machine network but after changing machine network it succeeds" , func () {
@@ -1620,7 +1620,7 @@ var _ = Describe("Reconcile", func() {
1620
1620
Name : clusterInstallName ,
1621
1621
}
1622
1622
_ , err := r .Reconcile (ctx , ctrl.Request {NamespacedName : key })
1623
- Expect (err ).ToNot (HaveOccurred ())
1623
+ Expect (err ).To (HaveOccurred ())
1624
1624
1625
1625
Expect (c .Get (ctx , key , clusterInstall )).To (Succeed ())
1626
1626
cond := findCondition (clusterInstall .Status .Conditions , hivev1 .ClusterInstallRequirementsMet )
@@ -1651,7 +1651,7 @@ var _ = Describe("Reconcile", func() {
1651
1651
cond = findCondition (clusterInstall .Status .Conditions , hivev1 .ClusterInstallRequirementsMet )
1652
1652
Expect (cond ).NotTo (BeNil ())
1653
1653
Expect (cond .Status ).To (Equal (corev1 .ConditionTrue ))
1654
- Expect (cond .Reason ).To (Equal (v1alpha1 .HostValidationSucceeded ))
1654
+ Expect (cond .Reason ).To (Equal (v1alpha1 .HostConfigurationSucceededReason ))
1655
1655
})
1656
1656
1657
1657
It ("labels secrets for backup" , func () {
0 commit comments