diff --git a/online-tests/conftest.py b/online-tests/conftest.py index 907bd17a..7b3815ee 100644 --- a/online-tests/conftest.py +++ b/online-tests/conftest.py @@ -29,6 +29,14 @@ def maildomain(): return domain +@pytest.fixture +def chatmail_ssh(maildomain): + domain = os.environ.get("CHATMAIL_SSH") + if not domain: + domain = maildomain + return domain + + def pytest_report_header(): domain = os.environ.get("CHATMAIL_DOMAIN") if domain: @@ -150,10 +158,10 @@ def cmfactory(request, maildomain, gencreds, tmpdir, data): @pytest.fixture -def dovelogreader(maildomain): +def dovelogreader(chatmail_ssh): def remote_reader(): popen = subprocess.Popen( - ["ssh", f"root@{maildomain}", "journalctl -f -u dovecot"], + ["ssh", f"root@{chatmail_ssh}", "journalctl -f -u dovecot"], stdout=subprocess.PIPE, ) while 1: diff --git a/scripts/test.sh b/scripts/test.sh index 64e3bb74..5d89eaa6 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -4,4 +4,4 @@ pushd chatmaild/src/chatmaild ../../venv/bin/pytest popd -online-tests/venv/bin/pytest online-tests/ -vrx --durations=5 +online-tests/venv/bin/pytest online-tests/ -vrx --durations=5 --slow