From d3769b3b737a36b6813fec38640a01179b5c014e Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Mon, 7 Nov 2022 12:50:05 +0100 Subject: [PATCH] OP-3426 - fix - add _tests suffix only if not present _tests suffix is added to avalon and openpype DB for testing run. env vars for these might be already injected, so do not add them again. --- start.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/start.py b/start.py index ec0465b0f5..e360f373a1 100644 --- a/start.py +++ b/start.py @@ -1030,9 +1030,11 @@ def boot(): if os.environ.get("IS_TEST") == "1": # change source DBs to predefined ones set for automatic testing - os.environ["OPENPYPE_DATABASE_NAME"] += "_tests" + if "_tests" not in os.environ["OPENPYPE_DATABASE_NAME"]: + os.environ["OPENPYPE_DATABASE_NAME"] += "_tests" avalon_db = os.environ.get("AVALON_DB") or "avalon" - os.environ["AVALON_DB"] = avalon_db + "_tests" + if "_tests" not in avalon_db: + os.environ["AVALON_DB"] = avalon_db + "_tests" global_settings = get_openpype_global_settings(openpype_mongo)