Skip to content

Commit

Permalink
Fixed power state checking
Browse files Browse the repository at this point in the history
  • Loading branch information
donob4n committed Jul 12, 2020
1 parent 6733fb1 commit 665a145
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions qubesmanager/tests/test_qube_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -1085,19 +1085,17 @@ def test_414_vm_state_change(self):
self._run_command_and_process_events(
["qvm-start", target_vm_name], timeout=60)

status_item = self._get_table_item(vm_row, "State")
displayed_state = self._get_table_item(vm_row, "State")

displayed_power_state = status_item.on_icon.status

self.assertEqual(displayed_power_state, 3,
self.assertEqual(displayed_state['power'], 'Running',
"Power state failed to update on start")

self._run_command_and_process_events(
["qvm-shutdown", "--wait", target_vm_name], timeout=30)

displayed_power_state = status_item.on_icon.status
displayed_state = self._get_table_item(vm_row, "State")

self.assertEqual(displayed_power_state, 0,
self.assertEqual(displayed_state['power'], 'Halted',
"Power state failed to update on shutdown")

def test_415_template_vm_started(self):
Expand Down

0 comments on commit 665a145

Please sign in to comment.