From 503a6ba9ab7b0982820b82a9f7317aff6249c9e8 Mon Sep 17 00:00:00 2001 From: Yuma Ogami Date: Thu, 7 Mar 2024 01:19:22 +0000 Subject: [PATCH] update --- e2e/suite_test.go | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/e2e/suite_test.go b/e2e/suite_test.go index 2057f4b6..313734de 100644 --- a/e2e/suite_test.go +++ b/e2e/suite_test.go @@ -354,6 +354,18 @@ var _ = Describe("rbd backup system", func() { _, _, err := kubectl("-n", namespace, "delete", "pvc", pvcName2) Expect(err).NotTo(HaveOccurred()) + By("Checking backup target PVC deletion") + Eventually(func() error { + stdout, stderr, err := kubectl("-n", namespace, "get", "pvc", pvcName2) + if err != nil { + if strings.Contains(string(stderr), kubectlIsNotFoundMessage) { + return nil + } + return fmt.Errorf("get pvc %s failed. stderr: %s, err: %w", pvcName2, string(stderr), err) + } + return fmt.Errorf("PVC %s still exists. stdout: %s", pvcName2, stdout) + }).Should(Succeed()) + By("Checking that the status.conditions of the RBDPVCBackup resource remain \"Bound\"") stdout, _, err := kubectl("-n", namespace, "get", "rbdpvcbackup", rbdPVCBackupName3, "-o", "json") Expect(err).NotTo(HaveOccurred()) @@ -393,7 +405,7 @@ var _ = Describe("rbd backup system", func() { return nil }).Should(Succeed()) - By("Confirming RBDPVCBackup resource deletion") + By("Checking RBDPVCBackup resource deletion") Eventually(func() error { stdout, stderr, err := kubectl("-n", namespace, "get", "rbdpvcbackup", rbdPVCBackupName) if err != nil {