Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
cupnes committed Mar 4, 2024
1 parent 05ff803 commit 62fc6d3
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 @@ -10,7 +10,6 @@ import (
"testing"
"time"

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 @@ -233,19 +232,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("Deleting RBDPVCBackup")
Expand Down

0 comments on commit 62fc6d3

Please sign in to comment.