forked from p15670423/monkey
cc: deploy "develop" environment by default
This commit is contained in:
parent
fc2f8eca45
commit
fef44bcd05
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
{
|
||||
"server_config": "password",
|
||||
"deployment": "standard"
|
||||
}
|
|
@ -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"
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue