Skip to content

Commit

Permalink
fixup test_create_standby
Browse files Browse the repository at this point in the history
  • Loading branch information
Bodong-Yang committed Feb 19, 2024
1 parent 7f88df9 commit d2e1be0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/test_create_standby.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ def test_update_with_create_standby_RebuildMode(self, mocker: MockerFixture):
proxy=None,
control_flags=otaclient_control_flags,
)
_updater._process_persistents = persist_handler = mocker.MagicMock()
# NOTE: mock the shutdown method as we need to assert before the
# updater is closed.
_updater_shutdown = _updater.shutdown
Expand All @@ -110,6 +111,7 @@ def test_update_with_create_standby_RebuildMode(self, mocker: MockerFixture):
time.sleep(2) # wait for downloader to record stats

# ------ assertions ------ #
persist_handler.assert_called_once()
# --- assert update finished
_updater.shutdown.assert_called_once()
otaclient_control_flags.wait_can_reboot_flag.assert_called_once()
Expand Down

0 comments on commit d2e1be0

Please sign in to comment.