Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
cupnes committed Mar 7, 2024
1 parent 66d12a0 commit 503a6ba
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion e2e/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 503a6ba

Please sign in to comment.