-
Notifications
You must be signed in to change notification settings - Fork 71
[Storage] STD: Make Velero Hooks in virt-launcher Optional or Removable #5340
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
88cf218
c60a158
25d3ea3
9b40378
4ce502c
1d02145
68dd34d
d586d82
c74b13b
9953da0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| """ | ||
|
ema-aka-young marked this conversation as resolved.
|
||
| Velero Backup Hook Opt-Out Tests | ||
|
|
||
| STP: https://github.com/RedHatQE/openshift-virtualization-tests-design-docs/blob/main/stps/sig-storage/remove-velero-hooks-stp.md | ||
| Jira: https://redhat.atlassian.net/browse/CNV-79727 # <skip-jira-utils-check> | ||
| """ | ||
|
|
||
| import pytest | ||
|
|
||
|
|
||
| class TestVeleroBackupHookOptOut: | ||
| """ | ||
| Tests for Velero backup hook opt-out with backup/restore operations. | ||
|
|
||
| Preconditions: | ||
| - VM with backup hooks disabled | ||
| """ | ||
|
|
||
| __test__ = False | ||
|
|
||
| @pytest.mark.polarion("CNV-16267") | ||
| def test_backup_paused_vm_hooks_disabled(self): | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need both of these tests? I'm not sure I fully understand the difference between them, aside from the restore part in the second test. Could you clarify the intent?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The main difference is the VM state. In this one we are performing the backup of a paused VM to provide coverage for this use case.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not to restore the VM?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From the STP:
This case proves the annotation is honored for a paused state, while the next one proves the full backup/restore works without hooks. From my understanding, the restore doesn't know or care if the state of VM when backing up was paused or running. |
||
| """ | ||
| Test that backup of paused VM completes with hooks disabled. | ||
|
|
||
| Preconditions: | ||
| - VM with backup hooks disabled, paused | ||
|
|
||
| Steps: | ||
| 1. Run Velero backup | ||
|
|
||
| Expected: | ||
| Backup completes successfully without freeze/unfreeze hook execution | ||
| """ | ||
|
|
||
| @pytest.mark.polarion("CNV-16268") | ||
| def test_full_backup_restore_hooks_disabled(self): | ||
| """ | ||
| Test that full backup/restore cycle completes with hooks disabled. | ||
|
|
||
| Preconditions: | ||
| - Running VM with backup hooks disabled | ||
|
|
||
| Steps: | ||
| 1. Run Velero backup | ||
| 2. Delete VM and namespace | ||
| 3. Restore from backup | ||
|
|
||
| Expected: | ||
| VM is restored and running after backup/restore cycle | ||
| """ | ||
Uh oh!
There was an error while loading. Please reload this page.