Skip to content

Commit

Permalink
Remote resistant no launcher (Bugfix) (#1042)
Browse files Browse the repository at this point in the history
* Use default Configuration when controller doesn't provide any

* Test none launcher in remote assistant
  • Loading branch information
Hook25 authored Mar 6, 2024
1 parent 32c04d7 commit e4347c0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions checkbox-ng/plainbox/impl/session/remote_assistant.py
Original file line number Diff line number Diff line change
Expand Up @@ -720,9 +720,12 @@ def resume_by_id(self, session_id=None, overwrite_result_dict={}):
}
meta = self.resume_session(session_id, runner_kwargs=runner_kwargs)
app_blob = json.loads(meta.app_blob.decode("UTF-8"))
launcher_from_controller = Configuration.from_text(
app_blob["launcher"], "Remote launcher"
)
if "launcher" in app_blob:
launcher_from_controller = Configuration.from_text(
app_blob["launcher"], "Remote launcher"
)
else:
launcher_from_controller = Configuration()
self._launcher.update_from_another(
launcher_from_controller, "Remote launcher"
)
Expand Down
2 changes: 1 addition & 1 deletion checkbox-ng/plainbox/impl/session/test_remote_assistant.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ def test_resume_by_id_with_result_no_file_noreturn(
rsa._state = remote_assistant.Idle

mock_meta = mock.Mock()
mock_meta.app_blob = b'{"launcher": "", "testplan_id": "tp_id"}'
mock_meta.app_blob = b'{"testplan_id": "tp_id"}'

rsa.resume_session.return_value = mock_meta
os_path_exists_mock = mock.Mock()
Expand Down

0 comments on commit e4347c0

Please sign in to comment.