Skip to content

Commit

Permalink
Fix status check expectation in TestSpecImage with explicit version
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel Drobek committed Nov 8, 2024
1 parent d05cbd6 commit 20214b2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/e2e/infinispan/upgrade_operand_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
})
Expand Down

0 comments on commit 20214b2

Please sign in to comment.