From fef44bcd05af8cd284f9882cd383d345bf6f487a Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Wed, 17 Feb 2021 09:55:06 -0500 Subject: [PATCH] cc: deploy "develop" environment by default --- .travis.yml | 2 +- .../monkey_island/cc/environment/server_config_generator.py | 4 ++-- .../monkey_island/cc/environment/test_environment_config.py | 2 +- ...{server_config.json.default => server_config.json.develop} | 0 monkey/monkey_island/cc/server_config.json.standard | 4 ---- monkey/monkey_island/cc/server_utils/consts.py | 4 ++-- 6 files changed, 6 insertions(+), 10 deletions(-) rename monkey/monkey_island/cc/{server_config.json.default => server_config.json.develop} (100%) delete mode 100644 monkey/monkey_island/cc/server_config.json.standard diff --git a/.travis.yml b/.travis.yml index 8ac8db204..509da86ac 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,7 +18,7 @@ os: linux before_install: # Init server_config.json to default -- cp monkey/monkey_island/cc/server_config.json.default monkey/monkey_island/cc/server_config.json +- cp monkey/monkey_island/cc/server_config.json.develop monkey/monkey_island/cc/server_config.json install: # Python diff --git a/monkey/monkey_island/cc/environment/server_config_generator.py b/monkey/monkey_island/cc/environment/server_config_generator.py index c91922605..211b745c5 100644 --- a/monkey/monkey_island/cc/environment/server_config_generator.py +++ b/monkey/monkey_island/cc/environment/server_config_generator.py @@ -1,8 +1,8 @@ from pathlib import Path -from monkey_island.cc.server_utils.consts import DEFAULT_STANDARD_SERVER_CONFIG_PATH +from monkey_island.cc.server_utils.consts import DEFAULT_DEVELOP_SERVER_CONFIG_PATH def create_default_config_file(path): - default_config = Path(DEFAULT_STANDARD_SERVER_CONFIG_PATH).read_text() + default_config = Path(DEFAULT_DEVELOP_SERVER_CONFIG_PATH).read_text() Path(path).write_text(default_config) diff --git a/monkey/monkey_island/cc/environment/test_environment_config.py b/monkey/monkey_island/cc/environment/test_environment_config.py index e508112d4..b06e26301 100644 --- a/monkey/monkey_island/cc/environment/test_environment_config.py +++ b/monkey/monkey_island/cc/environment/test_environment_config.py @@ -109,7 +109,7 @@ def test_generate_default_file(config_file): assert os.path.isfile(config_file) assert environment_config.server_config == "password" - assert environment_config.deployment == "standard" + assert environment_config.deployment == "develop" assert environment_config.user_creds.username == "" assert environment_config.user_creds.password_hash == "" assert environment_config.aws is None diff --git a/monkey/monkey_island/cc/server_config.json.default b/monkey/monkey_island/cc/server_config.json.develop similarity index 100% rename from monkey/monkey_island/cc/server_config.json.default rename to monkey/monkey_island/cc/server_config.json.develop diff --git a/monkey/monkey_island/cc/server_config.json.standard b/monkey/monkey_island/cc/server_config.json.standard deleted file mode 100644 index 7bdd9a163..000000000 --- a/monkey/monkey_island/cc/server_config.json.standard +++ /dev/null @@ -1,4 +0,0 @@ -{ - "server_config": "password", - "deployment": "standard" -} diff --git a/monkey/monkey_island/cc/server_utils/consts.py b/monkey/monkey_island/cc/server_utils/consts.py index cb91b6578..44bcb5eba 100644 --- a/monkey/monkey_island/cc/server_utils/consts.py +++ b/monkey/monkey_island/cc/server_utils/consts.py @@ -9,6 +9,6 @@ DEFAULT_SERVER_CONFIG_PATH = os.path.join( MONKEY_ISLAND_ABS_PATH, "cc", "server_config.json" ) -DEFAULT_STANDARD_SERVER_CONFIG_PATH = os.path.join( - MONKEY_ISLAND_ABS_PATH, "cc", "server_config.json.standard" +DEFAULT_DEVELOP_SERVER_CONFIG_PATH = os.path.join( + MONKEY_ISLAND_ABS_PATH, "cc", "server_config.json.develop" )