apply nami's suggestions (chatmail SSH env var, running --slow in test.sh)

This commit is contained in:
holger krekel 2023-10-16 17:48:15 +02:00
parent df00333a19
commit b943f24587
2 changed files with 11 additions and 3 deletions

View File

@ -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:

View File

@ -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