@@ -46,12 +46,12 @@ func TestClusterCatalogUnpacking(t *testing.T) {
4646 }, time .Minute , time .Second )
4747
4848 var managerPod corev1.Pod
49- t .Log ("Waiting for only one controller-manager pod to remain " )
49+ t .Log ("Waiting for controller-manager pods to match the desired replica count " )
5050 require .EventuallyWithT (t , func (ct * assert.CollectT ) {
5151 var managerPods corev1.PodList
5252 err := c .List (ctx , & managerPods , client .MatchingLabels (managerLabelSelector ))
5353 require .NoError (ct , err )
54- require .Len (ct , managerPods .Items , 1 )
54+ require .Len (ct , managerPods .Items , int ( * managerDeployment . Spec . Replicas ) )
5555 managerPod = managerPods .Items [0 ]
5656 }, time .Minute , time .Second )
5757
@@ -221,7 +221,7 @@ func waitForDeployment(t *testing.T, ctx context.Context, controlPlaneLabel stri
221221 t .Logf ("Ensure the number of remaining pods equal the desired number of replicas (%d)" , desiredNumReplicas )
222222 require .EventuallyWithT (t , func (ct * assert.CollectT ) {
223223 require .NoError (ct , c .List (ctx , & managerPods , client.MatchingLabelsSelector {Selector : deploymentLabelSelector }))
224- require .Len (ct , managerPods .Items , 1 )
224+ require .Len (ct , managerPods .Items , int ( desiredNumReplicas ) )
225225 }, time .Minute , time .Second )
226226 return & managerPods .Items [0 ]
227227}
0 commit comments