Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
cupnes committed Mar 5, 2024
1 parent d778590 commit 122d0e3
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions e2e/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (

"k8s.io/apimachinery/pkg/api/errors"

backupv1 "github.com/cybozu-go/rbd-backup-system/api/v1"
"github.com/cybozu-go/rbd-backup-system/internal/controller"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
Expand Down Expand Up @@ -234,19 +233,19 @@ var _ = Describe("rbd backup system", func() {
}).Should(Succeed())
})

It("should not delete RBDPVCBackup resource when delete backup target PVC", func() {
By("Deleting backup target PVC")
_, _, err := kubectl("-n", namespace, "delete", "pvc", pvcName)
Expect(err).NotTo(HaveOccurred())

By("Checking that the status.conditions of the RBDPVCBackup resource remain \"Bound\"")
stdout, _, err := kubectl("-n", namespace, "get", "rbdpvcbackup", rbdPVCBackupName, "-o", "json")
Expect(err).NotTo(HaveOccurred())
var backup backupv1.RBDPVCBackup
err = yaml.Unmarshal(stdout, &backup)
Expect(err).NotTo(HaveOccurred())
Expect(backup.Status.Conditions).To(Equal(backupv1.RBDPVCBackupConditionsBound))
})
// It("should not delete RBDPVCBackup resource when delete backup target PVC", func() {
// By("Deleting backup target PVC")
// _, _, err := kubectl("-n", namespace, "delete", "pvc", pvcName)
// Expect(err).NotTo(HaveOccurred())

// By("Checking that the status.conditions of the RBDPVCBackup resource remain \"Bound\"")
// stdout, _, err := kubectl("-n", namespace, "get", "rbdpvcbackup", rbdPVCBackupName, "-o", "json")
// Expect(err).NotTo(HaveOccurred())
// var backup backupv1.RBDPVCBackup
// err = yaml.Unmarshal(stdout, &backup)
// Expect(err).NotTo(HaveOccurred())
// Expect(backup.Status.Conditions).To(Equal(backupv1.RBDPVCBackupConditionsBound))
// })

It("should delete RBDPVCBackup resource", func() {
By("Delete RBDPVCBackup")
Expand Down

0 comments on commit 122d0e3

Please sign in to comment.