From 4a0820e57f9db594ded134e62a59a3b8a93fc491 Mon Sep 17 00:00:00 2001 From: Francesco Pantano Date: Mon, 12 Aug 2024 11:03:46 +0200 Subject: [PATCH] Remove errorReason from tls input check functional test We're not really interested in the ErrorReason as we depends on what is provided by lib-common. However, We still want to match the resulting condition boolean. This patch removes the TLSInput error message so we don't fail if something changes in lib-common. Signed-off-by: Francesco Pantano --- test/functional/cinder_controller_test.go | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/test/functional/cinder_controller_test.go b/test/functional/cinder_controller_test.go index e6ec7e9b..b07352d7 100644 --- a/test/functional/cinder_controller_test.go +++ b/test/functional/cinder_controller_test.go @@ -484,47 +484,39 @@ var _ = Describe("Cinder controller", func() { }) It("reports that the CA secret is missing", func() { - th.ExpectConditionWithDetails( + th.ExpectCondition( cinderTest.CinderAPI, ConditionGetterFunc(CinderAPIConditionGetter), condition.TLSInputReadyCondition, corev1.ConditionFalse, - condition.ErrorReason, - fmt.Sprintf("TLSInput error occured in TLS sources Secret %s/combined-ca-bundle not found", namespace), ) - th.ExpectConditionWithDetails( + th.ExpectCondition( cinderTest.CinderScheduler, ConditionGetterFunc(CinderSchedulerConditionGetter), condition.TLSInputReadyCondition, corev1.ConditionFalse, - condition.ErrorReason, - fmt.Sprintf("TLSInput error occured in TLS sources Secret %s/combined-ca-bundle not found", namespace), ) }) It("reports that the internal cert secret is missing", func() { DeferCleanup(k8sClient.Delete, ctx, th.CreateCABundleSecret(cinderTest.CABundleSecret)) - th.ExpectConditionWithDetails( + th.ExpectCondition( cinderTest.CinderAPI, ConditionGetterFunc(CinderAPIConditionGetter), condition.TLSInputReadyCondition, corev1.ConditionFalse, - condition.ErrorReason, - fmt.Sprintf("TLSInput error occured in TLS sources Secret %s/internal-tls-certs not found", namespace), ) }) It("reports that the public cert secret is missing", func() { DeferCleanup(k8sClient.Delete, ctx, th.CreateCABundleSecret(cinderTest.CABundleSecret)) DeferCleanup(k8sClient.Delete, ctx, th.CreateCertSecret(cinderTest.InternalCertSecret)) - th.ExpectConditionWithDetails( + th.ExpectCondition( cinderTest.CinderAPI, ConditionGetterFunc(CinderAPIConditionGetter), condition.TLSInputReadyCondition, corev1.ConditionFalse, - condition.ErrorReason, - fmt.Sprintf("TLSInput error occured in TLS sources Secret %s/public-tls-certs not found", namespace), ) })