diff --git a/tests/e2e/suite_test.go b/tests/e2e/suite_test.go index fbb8d92a7..a45b84942 100644 --- a/tests/e2e/suite_test.go +++ b/tests/e2e/suite_test.go @@ -308,8 +308,11 @@ func InstallBackupOperator(k *kubectl.Kubectl) { // backupRscSet should be used for newer versions switch { + case strings.Contains(rancherVersion, ":v2.14"): + backupRestoreVersion = "v9.0.1" + backupRscSet = "rancher-resource-set-full" case strings.Contains(rancherVersion, ":v2.13"): - backupRestoreVersion = "v9.0.0" + backupRestoreVersion = "v9.0.1" backupRscSet = "rancher-resource-set-full" case strings.Contains(rancherVersion, ":v2.12"): backupRestoreVersion = "v8.1.1" @@ -706,21 +709,21 @@ Wait for all pods to be Running/Succeeded in the current K8s cluster - @returns Nothing, the function will fail through Ginkgo in case of issue */ func WaitForAllPods() { - // Extract list of pods - pods, _ := kubectl.RunWithoutErr("get", "pod", "--all-namespaces", - "-o", "jsonpath={.items[*].metadata.name}") + // Log pods list, useful for debugging + podDetails, _ := kubectl.RunWithoutErr("get", "pod", "--all-namespaces") + GinkgoWriter.Printf("%s\n", podDetails) - for _, p := range strings.Fields(pods) { - Eventually(func() string { - // We have to search for p in all namespaces as we don't know them in advance - status, _ := kubectl.RunWithoutErr("get", "pod", "--all-namespaces", - "-o", "jsonpath={.items[?(@.metadata.name==\""+p+"\")].status.phase}") - return status - }, tools.SetTimeout(8*time.Minute), 30*time.Second).Should(Or( - ContainSubstring("Running"), - ContainSubstring("Succeeded"), - )) - } + okStatus := strings.NewReplacer("Running", "", "Succeeded", "", "Completed", "") + Eventually(func() string { + podStatus, _ := kubectl.RunWithoutErr("get", "pod", "--all-namespaces", + "-o", "jsonpath={.items[*].status.phase}") + s := strings.TrimSpace(okStatus.Replace(podStatus)) + + // Log pods status, useful for debugging + GinkgoWriter.Printf("Pods Status: %s\n", s) + + return s + }, tools.SetTimeout(4*time.Minute), 30*time.Second).Should(BeEmpty()) } /*