Wait for RS to report status rather than count pods

Signed-off-by: Maciej Szulik <soltysh@gmail.com>
This commit is contained in:
Maciej Szulik 2026-03-04 14:33:55 +01:00
parent dd0958fece
commit 0dec4fa548
No known key found for this signature in database
GPG key ID: F15E55D276FA84C4

View file

@ -415,11 +415,11 @@ func testRSScaleSubresources(ctx context.Context, f *framework.Framework) {
replicas := int32(1)
ginkgo.By(fmt.Sprintf("Creating replica set %q that asks for more than the allowed pod quota", rsName))
rs := newRS(rsName, replicas, rsPodLabels, AgnhostImageName, AgnhostImage, nil)
_, err := c.AppsV1().ReplicaSets(ns).Create(ctx, rs, metav1.CreateOptions{})
createdRS, err := c.AppsV1().ReplicaSets(ns).Create(ctx, rs, metav1.CreateOptions{})
framework.ExpectNoError(err)
// Verify that the required pods have come up.
err = e2epod.VerifyPodsRunning(ctx, c, ns, podName, labels.SelectorFromSet(map[string]string{"name": podName}), false, replicas)
err = e2ereplicaset.WaitForReplicaSetTargetAvailableReplicas(ctx, c, createdRS, replicas)
framework.ExpectNoError(err, "error in waiting for pods to come up: %s", err)
ginkgo.By("getting scale subresource")