diff --git a/monkey/monkey_island.py b/monkey/monkey_island.py index 02d2584c9..f96314c63 100644 --- a/monkey/monkey_island.py +++ b/monkey/monkey_island.py @@ -4,6 +4,7 @@ import monkey_island.setup.gevent_setup # noqa: F401 isort:skip import json from monkey_island.cc.arg_parser import parse_cli_args +from monkey_island.cc.server_setup import setup_island from monkey_island.cc.server_utils.island_logger import setup_logging from monkey_island.setup.config_setup import setup_config_by_cmd_arg, setup_default_config @@ -28,10 +29,4 @@ if "__main__" == __name__: print(f"Error loading server config: {ex}") exit(1) - # We need to initialize environment singleton before importing main, - # because main imports modules from monkey_island/cc/models and models need a connection to the - # mongodb. Mongodb connection parameters are initialized in environment singleton. - - from monkey_island.cc.server_setup import setup_island # noqa: E402 - setup_island(island_args.setup_only, config, server_config_path) diff --git a/monkey/tests/unit_tests/monkey_island/cc/setup/test_process_runner.py b/monkey/tests/unit_tests/monkey_island/cc/setup/test_process_runner.py deleted file mode 100644 index e69de29bb..000000000