Skip to content

Commit

Permalink
Use eventually to check pod status
Browse files Browse the repository at this point in the history
Signed-off-by: Chandan Pinjani <[email protected]>
  • Loading branch information
cpinjani committed Jan 21, 2025
1 parent a1ceaa3 commit 37d00a6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion hosted/aks/p1/p1_import_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,8 @@ var _ = Describe("P1Import", func() {
removeSystemNpCheck(cluster, ctx.RancherAdminClient)
})

It("should to able to delete a nodepool and add a new one", func() {
XIt("should to able to delete a nodepool and add a new one", func() {
// Blocked by: https://github.com/rancher/aks-operator/issues/667#issuecomment-2370798904
testCaseID = 268
deleteAndAddNpCheck(cluster, ctx.RancherAdminClient)
})
Expand Down
1 change: 0 additions & 1 deletion hosted/eks/p1/p1_import_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ var _ = Describe("P1Import", func() {
})

It("Update cluster logging types", func() {
// https://github.com/rancher/eks-operator/issues/938
testCaseID = 77
updateLoggingCheck(cluster, ctx.RancherAdminClient)
})
Expand Down
1 change: 0 additions & 1 deletion hosted/eks/p1/p1_provisioning_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,6 @@ var _ = Describe("P1Provisioning", func() {
})

It("Update cluster logging types", func() {
// https://github.com/rancher/eks-operator/issues/938
testCaseID = 128
updateLoggingCheck(cluster, ctx.RancherAdminClient)
})
Expand Down
6 changes: 4 additions & 2 deletions hosted/helpers/helper_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (

"github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/rancher-sandbox/ele-testhelpers/tools"
"github.com/rancher/rancher/tests/v2/actions/clusters"
"github.com/rancher/rancher/tests/v2/actions/pipeline"
"github.com/rancher/shepherd/clients/rancher"
Expand Down Expand Up @@ -190,8 +191,9 @@ func ClusterIsReadyChecks(cluster *management.Cluster, client *rancher.Client, c
})

ginkgo.By("checking all pods are ready", func() {
podErrors := pods.StatusPods(client, cluster.ID)
Expect(podErrors).To(BeEmpty())
Eventually(func() []error {
return pods.StatusPods(client, cluster.ID)
}, tools.SetTimeout(30*time.Second), Timeout).Should(BeEmpty(), "All pods are not running")
})
}

Expand Down

0 comments on commit 37d00a6

Please sign in to comment.