Skip to content

Align restore reconcile tests with backup phase validation#9874

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-review-comment-3337885080
Draft

Align restore reconcile tests with backup phase validation#9874
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-review-comment-3337885080

Conversation

Copilot AI commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Thank you for contributing to Velero!

Please add a summary of your change

TestRestoreReconcile still had cases using defaultBackup() in ReadyToStart, which now fails restore validation before the intended code path executes. This update applies the review suggestion by setting backup phase explicitly to Completed only in cases meant to proceed past validation.

  • Review-comment scope only
    • Updated only the test fixtures called out by the review thread in pkg/controller/restore_controller_test.go.
  • Behavior-preserving test intent
    • Cases that should exercise restore execution/failure paths now explicitly use a completed backup.
  • Applied pattern
    // before
    defaultBackup().StorageLocation("default").Result()
    
    // after
    defaultBackup().StorageLocation("default").Phase(velerov1api.BackupPhaseCompleted).Result()

Does your change fix a particular issue?

Please indicate you've done the following:

@netlify

netlify Bot commented Jun 2, 2026

Copy link
Copy Markdown

Deploy Preview for velero canceled.

Name Link
🔨 Latest commit e1a54a2
🔍 Latest deploy log https://app.netlify.com/projects/velero/deploys/6a1e241917ce29000840bd6c

Copilot AI changed the title [WIP] Fix code as per review comment 3337885080 Align restore reconcile tests with backup phase validation Jun 2, 2026
Copilot AI requested a review from kaovilai June 2, 2026 00:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants