From 20214b274a1a039b10dd014efad34e88a0e17c75 Mon Sep 17 00:00:00 2001 From: Pavel Drobek Date: Fri, 8 Nov 2024 16:53:48 +0100 Subject: [PATCH] Fix status check expectation in TestSpecImage with explicit version --- test/e2e/infinispan/upgrade_operand_test.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/e2e/infinispan/upgrade_operand_test.go b/test/e2e/infinispan/upgrade_operand_test.go index ef82431c7..31a9116ee 100644 --- a/test/e2e/infinispan/upgrade_operand_test.go +++ b/test/e2e/infinispan/upgrade_operand_test.go @@ -297,13 +297,19 @@ func TestSpecImage(t *testing.T) { spec := tutils.DefaultSpec(t, testKube, func(i *ispnv1.Infinispan) { i.Spec.Image = pointer.String(operand.Image) }) + + statusVersionRef := versionManager.Latest().Ref() + if tutils.OperandVersion != "" { + statusVersionRef = tutils.OperandVersion + } + testKube.CreateInfinispan(spec, tutils.Namespace) testKube.WaitForInfinispanPods(1, tutils.SinglePodTimeout, spec.Name, tutils.Namespace) testKube.WaitForInfinispanCondition(spec.Name, spec.Namespace, ispnv1.ConditionWellFormed) testKube.WaitForInfinispanState(spec.Name, spec.Namespace, func(i *ispnv1.Infinispan) bool { return i.IsConditionTrue(ispnv1.ConditionWellFormed) && i.Status.Operand.CustomImage && - i.Status.Operand.Version == versionManager.Latest().Ref() && + i.Status.Operand.Version == statusVersionRef && i.Status.Operand.Image == operand.Image && i.Status.Operand.Phase == ispnv1.OperandPhaseRunning })