new-features (#5)

* refactoring and rework: runner now has setups / tests / cleanups as lists
* add nextcloud runner
* add email testing prototype with imap fixture
* add dependency resolution (sort env files in input so that test order is correct)

Reviewed-on: local-it-infrastructure/e2e_tests#5
Co-authored-by: Daniel <d.brummerloh@gmail.com>
Co-committed-by: Daniel <d.brummerloh@gmail.com>
This commit is contained in:
Daniel 2023-12-04 12:46:30 +01:00 committed by dan
parent 2e33f8f014
commit d3dc0f942a
32 changed files with 573 additions and 247 deletions

View file

@ -17,6 +17,8 @@ from src.utils import get_session_id
# requires that authentik ran first to create the admin session and the user
# session. At the moment, wrong ordering results in unsuccessful test
# (wrong ordering would be wordpress env file is before authentik env file).
# At the moment, functionailty is only guaranteed if each env file use
# a unique TYPE var.
ENV_FILES = [
Path("envfiles/login.test.dev.local-it.cloud.env"), # authentik
@ -38,12 +40,13 @@ OUTPUT_DIR = Path("./test-output").resolve()
# --------------------- load credentials to env variables -------------------- #
cred_file = Path("credentials.json")
with open(cred_file, "r") as f:
CREDENTIALS = json.load(f)
os.environ["ADMIN_USER"] = CREDENTIALS["admin_user"]
os.environ["ADMIN_PASS"] = CREDENTIALS["admin_pass"]
for key, value in CREDENTIALS.items():
os.environ[key] = value
# ----------------------------- define session_id ---------------------------- #
@ -56,7 +59,7 @@ session_id = get_session_id()
# ------------------------------- setup logging ------------------------------ #
DIR = DirManager(output_dir=OUTPUT_DIR, session_id=session_id)
log_file = DIR.RESULTS / "full.log"
log_file = DIR.RECORDS / "coordinator.log"
logger.add(log_file)