Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cupnes committed Mar 7, 2024
1 parent 9dc03ed commit 5612e01
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion e2e/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ var _ = BeforeSuite(func() {
return nil
}).Should(Succeed())

By("[BeforeSuite] Creating Rook Pool and SC")
By("[BeforeSuite] Creating RBD Pool and SC")
Eventually(func() error {
manifest := fmt.Sprintf(testRookPoolSCTemplate, poolName, namespace, poolName, namespace, namespace, namespace)
_, _, err := kubectlWithInput([]byte(manifest), "apply", "-n", namespace, "-f", "-")
Expand Down
5 changes: 0 additions & 5 deletions internal/controller/rbdpvcbackup_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,6 @@ func (r *RBDPVCBackupReconciler) Reconcile(ctx context.Context, req ctrl.Request
exitCode := waitStatus.ExitStatus()
if exitCode != int(syscall.ENOENT) {
logger.Error("failed to remove rbd snapshot", "poolName", poolName, "imageName", imageName, "snapshotName", backup.Name, "exitCode", exitCode, "error", err)
err2 := r.updateConditions(ctx, &backup, backupv1.RBDPVCBackupConditionsFailed)
if err2 != nil {
return ctrl.Result{}, err2
}
return ctrl.Result{Requeue: true}, nil
}
}
Expand All @@ -208,7 +204,6 @@ func (r *RBDPVCBackupReconciler) Reconcile(ctx context.Context, req ctrl.Request

if !controllerutil.ContainsFinalizer(&backup, RBDPVCBackupFinalizerName) {
controllerutil.AddFinalizer(&backup, RBDPVCBackupFinalizerName)
logger.Info("set finalizer\n")
err = r.Update(ctx, &backup)
if err != nil {
logger.Error("failed to add finalizer", "finalizer", RBDPVCBackupFinalizerName, "error", err)
Expand Down
4 changes: 2 additions & 2 deletions internal/controller/rbdpvcbackup_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ var _ = Describe("RBDPVCBackup controller", func() {
Expect(<-errCh).NotTo(HaveOccurred())
})

It("should set finalizer and status fields on RBDPVCBackup resource creation and deletion", func() {
It("should set/unset finalizer and status fields properly on the resource creation/deletion", func() {
ctx := context.Background()
ns := createNamespace()

Expand Down Expand Up @@ -218,7 +218,7 @@ var _ = Describe("RBDPVCBackup controller", func() {
}).Should(Succeed())
})

It("should remain \"Bound\" in RBDPVCBackup resource even if the PVC is broken", func() {
It("should remain \"Bound\" in RBDPVCBackup resource even if the PVC is not bound", func() {
ctx := context.Background()
ns := createNamespace()

Expand Down

0 comments on commit 5612e01

Please sign in to comment.