// ExpectCondition take a condition type and returns its status, reason and message
ExpectCondition take a condition type and returns its status, reason and message
// ExpectCondition take a condition type and returns its status reason and message
func ExpectCondition(
	ps *syncv1alpha1.ProgressiveSync, ct string,
) AsyncAssertion {
	return Eventually(func() string {
		_ = k8sClient.Get(
			context.Background(),
			types.NamespacedName{Name: ps.Name, Namespace: ps.Namespace},
			ps,
		)
		for _, c := range ps.Status.Conditions {
			if c.Type == ct {
				return statusString(c.Status, c.Reason, c.Message)
			}
		}
		return ""
	})
}
func ExpectCondition ( ps * syncv1alpha1 . ProgressiveSync , ct string , ) AsyncAssertion { return Eventually ( func ( ) string { _ = k8sClient . Get ( context . Background ( ) , types . NamespacedName { Name : ps . Name , Namespace : ps . Namespace } , ps , ) for _ , c := range ps . Status . Conditions { if c . Type == ct { return statusString ( c . Status , c . Reason , c . Message ) } } return " " } ) }
ExpectCondition take a condition type and returns its status, reason and message
ExpectCondition take a condition type and returns its status reason and message