From a0ddb4b20ce6d475fe156e9139413306f827a8f3 Mon Sep 17 00:00:00 2001 From: Rafaela Maria Soares da Silva Date: Mon, 25 Nov 2024 20:02:15 +0000 Subject: [PATCH] check that SocialEvent is a ready state (#1071) --- test/e2e/parallel/registration_service_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/e2e/parallel/registration_service_test.go b/test/e2e/parallel/registration_service_test.go index aca497901..b0b17bb00 100644 --- a/test/e2e/parallel/registration_service_test.go +++ b/test/e2e/parallel/registration_service_test.go @@ -26,6 +26,7 @@ import ( routev1 "github.com/openshift/api/route/v1" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + corev1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" @@ -787,7 +788,10 @@ func TestActivationCodeVerification(t *testing.T) { testsocialevent.WithTargetCluster(member2Await.ClusterName)) err := hostAwait.CreateWithCleanup(t, event) require.NoError(t, err) - event, err = hostAwait.WaitForSocialEvent(t, event.Name) // need to reload event + event, err = hostAwait.WaitForSocialEvent(t, event.Name, wait.UntilSocialEventHasConditions(toolchainv1alpha1.Condition{ + Type: toolchainv1alpha1.ConditionReady, + Status: corev1.ConditionTrue, + })) // need to reload event require.NoError(t, err) event.Status.ActivationCount = event.Spec.MaxAttendees // activation count identical to `MaxAttendees` err = hostAwait.Client.Status().Update(context.TODO(), event)