diff --git a/src/openjd/adaptor_runtime/_entrypoint.py b/src/openjd/adaptor_runtime/_entrypoint.py index 86a6aae..5275ccf 100644 --- a/src/openjd/adaptor_runtime/_entrypoint.py +++ b/src/openjd/adaptor_runtime/_entrypoint.py @@ -241,6 +241,7 @@ def _build_argparser(self) -> ArgumentParser: path_mapping_rules = ArgumentParser(add_help=False) path_mapping_rules.add_argument( "--path-mapping-rules", + default="", required=False, type=_load_data, help=_CLI_HELP_TEXT["path_mapping_rules"], diff --git a/test/openjd/adaptor_runtime/unit/background/test_frontend_runner.py b/test/openjd/adaptor_runtime/unit/background/test_frontend_runner.py index 114e586..f454899 100644 --- a/test/openjd/adaptor_runtime/unit/background/test_frontend_runner.py +++ b/test/openjd/adaptor_runtime/unit/background/test_frontend_runner.py @@ -80,10 +80,11 @@ def test_initializes_backend_process( adaptor_module.__package__ = "package" conn_file_path = "/path" init_data = {"init": "data"} + path_mapping_data = {} runner = FrontendRunner(conn_file_path) # WHEN - runner.init(adaptor_module, init_data) + runner.init(adaptor_module, init_data, path_mapping_data) # THEN assert caplog.messages == [ @@ -104,6 +105,8 @@ def test_initializes_backend_process( conn_file_path, "--init-data", json.dumps(init_data), + "--path-mapping-rules", + json.dumps(path_mapping_data), ], shell=False, close_fds=True, diff --git a/test/openjd/adaptor_runtime/unit/test_entrypoint.py b/test/openjd/adaptor_runtime/unit/test_entrypoint.py index 3747676..4b638b0 100644 --- a/test/openjd/adaptor_runtime/unit/test_entrypoint.py +++ b/test/openjd/adaptor_runtime/unit/test_entrypoint.py @@ -415,7 +415,7 @@ def test_runs_background_start( # THEN _parse_args_mock.assert_called_once() - mock_magic_init.assert_called_once_with(mock_adaptor_module, {}) + mock_magic_init.assert_called_once_with(mock_adaptor_module, {}, {}) mock_magic_start.assert_called_once_with(conn_file) mock_start.assert_called_once_with()