Skip to content

Commit

Permalink
Fix destroy domain paused_state_guest issue
Browse files Browse the repository at this point in the history
In different libvirt version, the behavior has slight difference,
So update code to make them compatibility

Signed-off-by: chunfuwen <[email protected]>
  • Loading branch information
chunfuwen committed Sep 10, 2024
1 parent d9f6455 commit e803cdd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions libvirt/tests/src/domain_life_cycle/create_destroy_domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,10 +334,10 @@ def test_destroy_domain_paused_state_guest(test, params, env):
auto_close=True)
virsh_session.sendline(start_vm_cmd)

virsh.start(dom_new_name, debug=True)
virsh.start(dom_new_name, ignore_status=True, debug=True)
vm_state = virsh.domstate(dom_new_name).stdout_text.strip()
if vm_state != 'paused':
test.fail("vm:%s is not in paused state" % dom_new_name)
if vm_state not in ['paused', 'shut off']:
test.fail("vm:%s is not in paused or shut off state" % dom_new_name)

virsh.destroy(dom_new_name, ignore_status=False)
vm_state = virsh.domstate(dom_new_name).stdout_text.strip()
Expand Down

0 comments on commit e803cdd

Please sign in to comment.