From e31e27873c9ee684a59d1517eb4c9994a3f261af Mon Sep 17 00:00:00 2001 From: Aniruddha Basak Date: Fri, 13 Oct 2023 12:30:21 +0530 Subject: [PATCH] fix HCloudTokenAvailableCondition review Signed-off-by: Aniruddha Basak --- controllers/hcloudremediation_controller_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/controllers/hcloudremediation_controller_test.go b/controllers/hcloudremediation_controller_test.go index 7d0e8d627..cde728e5a 100644 --- a/controllers/hcloudremediation_controller_test.go +++ b/controllers/hcloudremediation_controller_test.go @@ -194,6 +194,14 @@ var _ = Describe("HCloudRemediationReconciler", func() { }, timeout).Should(BeNil()) }) + It("checks if hcloudRemediation objects has the HCloudTokenAvailableCondition condition", func() { + Expect(testEnv.Create(ctx, hcloudRemediation)).To(Succeed()) + + Eventually(func() bool { + return isPresentAndTrue(hcloudMachineKey, hcloudRemediation, infrav1.HCloudTokenAvailableCondition) + }) + }) + It("checks that no remediation is tried if HCloud server does not exist anymore", func() { By("ensuring if hcloudMachine is provisioned") Eventually(func() bool {