diff --git a/Common/config.py b/Common/config.py index 96d43e8..3e7eac3 100644 --- a/Common/config.py +++ b/Common/config.py @@ -70,6 +70,7 @@ def get_env_or_default(env_name: str, default: Any, validation: Any = None) -> A USE_BINARY_EXECUTABLE = "DAN_TESTING_USE_BINARY_EXECUTABLE" in os.environ STEPS_CREATE_ACCOUNT = is_boolstring_true(get_env_or_default("DAN_TESTING_STEPS_CREATE_ACCOUNT", "true", is_boolstring)) STEPS_CREATE_TEMPLATE = is_boolstring_true(get_env_or_default("DAN_TESTING_STEPS_CREATE_TEMPLATE", "false", is_boolstring)) +NONINTERACTIVE = is_boolstring_true(get_env_or_default("DAN_TESTING_NONINTERACTIVE", "false", is_boolstring)) STEPS_RUN_TARI_CONNECTOR_TEST_SITE = is_boolstring_true(get_env_or_default("DAN_TESTING_STEPS_RUN_TARI_CONNECTOR_TEST_SITE", "true", is_boolstring)) STEPS_RUN_SIGNALLING_SERVER = True LISTEN_ONLY_ON_LOCALHOST = True diff --git a/docker_rig/dan-testing.Dockerfile b/docker_rig/dan-testing.Dockerfile index 68762f8..e0998bd 100644 --- a/docker_rig/dan-testing.Dockerfile +++ b/docker_rig/dan-testing.Dockerfile @@ -303,6 +303,7 @@ ENV DAN_TESTING_WEBUI_PORT=${DAN_TESTING_WEBUI_PORT:-18000} ENV DAN_TESTING_STEPS_CREATE_ACCOUNT=True ENV DAN_TESTING_STEPS_RUN_TARI_CONNECTOR_TEST_SITE=True ENV DAN_TESTING_USE_BINARY_EXECUTABLE=True +ENV DAN_TESTING_NONINTERACTIVE=True ENV DAN_TESTING_DATA_FOLDER=/home/tari/data ENV TARI_BINS_FOLDER=/usr/local/bin/ ENV TARI_DAN_BINS_FOLDER=/usr/local/bin/ diff --git a/main.py b/main.py index 8aecbcc..3d3707b 100644 --- a/main.py +++ b/main.py @@ -1,6 +1,7 @@ # pyright: reportUnboundVariable=false from Common.config import ( + NONINTERACTIVE, TARI_BINS_FOLDER, TARI_DAN_BINS_FOLDER, BURN_AMOUNT, @@ -480,7 +481,12 @@ def create_account(i: int, amount: int): if STRESS_TEST: stress_test() print(stats) - cli_loop() + if not NONINTERACTIVE: + cli_loop() + else: + print("Non-interactive mode") + while True: + time.sleep(10) except Exception as ex: print("Failed setup:", ex) traceback.print_exc()