Skip to content
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

Fix smoke test for restore vm strict tags failure #10597

Draft
wants to merge 1 commit into
base: 4.20
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions test/integration/smoke/test_vm_strict_host_tags.py
Original file line number Diff line number Diff line change
@@ -420,7 +420,11 @@ def test_02_restore_vm_strict_tags_failure(self):

self.assertEqual(self.host_h1.id, vm.hostid, "VM instance was not deployed on target host ID")
try:
# remove vm from cleanup list since it should not be restored and the vm gets expunged
self.cleanup.remove(vm)
vm.restore(self.apiclient, templateid=self.template_t2.id, expunge=True)
# If restore is successful, it will be added to the cleanup list. Ideally, this code should not be reached.
self.cleanup.append(vm)
self.fail("VM should not be restored")
except Exception as e:
self.assertTrue("No suitable host found for vm " in str(e))