mirror of
https://github.com/chatmail/relay.git
synced 2026-05-19 20:38:05 +00:00
apply nami's suggestions (chatmail SSH env var, running --slow in test.sh)
This commit is contained in:
@@ -29,6 +29,14 @@ def maildomain():
|
|||||||
return domain
|
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():
|
def pytest_report_header():
|
||||||
domain = os.environ.get("CHATMAIL_DOMAIN")
|
domain = os.environ.get("CHATMAIL_DOMAIN")
|
||||||
if domain:
|
if domain:
|
||||||
@@ -150,10 +158,10 @@ def cmfactory(request, maildomain, gencreds, tmpdir, data):
|
|||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def dovelogreader(maildomain):
|
def dovelogreader(chatmail_ssh):
|
||||||
def remote_reader():
|
def remote_reader():
|
||||||
popen = subprocess.Popen(
|
popen = subprocess.Popen(
|
||||||
["ssh", f"root@{maildomain}", "journalctl -f -u dovecot"],
|
["ssh", f"root@{chatmail_ssh}", "journalctl -f -u dovecot"],
|
||||||
stdout=subprocess.PIPE,
|
stdout=subprocess.PIPE,
|
||||||
)
|
)
|
||||||
while 1:
|
while 1:
|
||||||
|
|||||||
@@ -4,4 +4,4 @@ pushd chatmaild/src/chatmaild
|
|||||||
../../venv/bin/pytest
|
../../venv/bin/pytest
|
||||||
popd
|
popd
|
||||||
|
|
||||||
online-tests/venv/bin/pytest online-tests/ -vrx --durations=5
|
online-tests/venv/bin/pytest online-tests/ -vrx --durations=5 --slow
|
||||||
|
|||||||
Reference in New Issue
Block a user