cc: deploy "develop" environment by default

This commit is contained in:
Mike Salvatore 2021-02-17 09:55:06 -05:00
parent fc2f8eca45
commit fef44bcd05
6 changed files with 6 additions and 10 deletions

View File

@ -18,7 +18,7 @@ os: linux
before_install: before_install:
# Init server_config.json to default # 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: install:
# Python # Python

View File

@ -1,8 +1,8 @@
from pathlib import Path 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): 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) Path(path).write_text(default_config)

View File

@ -109,7 +109,7 @@ def test_generate_default_file(config_file):
assert os.path.isfile(config_file) assert os.path.isfile(config_file)
assert environment_config.server_config == "password" 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.username == ""
assert environment_config.user_creds.password_hash == "" assert environment_config.user_creds.password_hash == ""
assert environment_config.aws is None assert environment_config.aws is None

View File

@ -1,4 +0,0 @@
{
"server_config": "password",
"deployment": "standard"
}

View File

@ -9,6 +9,6 @@ DEFAULT_SERVER_CONFIG_PATH = os.path.join(
MONKEY_ISLAND_ABS_PATH, "cc", "server_config.json" MONKEY_ISLAND_ABS_PATH, "cc", "server_config.json"
) )
DEFAULT_STANDARD_SERVER_CONFIG_PATH = os.path.join( DEFAULT_DEVELOP_SERVER_CONFIG_PATH = os.path.join(
MONKEY_ISLAND_ABS_PATH, "cc", "server_config.json.standard" MONKEY_ISLAND_ABS_PATH, "cc", "server_config.json.develop"
) )