mirror of
https://github.com/chatmail/relay.git
synced 2026-05-20 12:58:04 +00:00
cmdeploy fmt
This commit is contained in:
@@ -367,7 +367,7 @@ def _configure_dovecot(config: Config, debug: bool = False) -> bool:
|
|||||||
if host.get_fact(Sysctl)[key] > 65535:
|
if host.get_fact(Sysctl)[key] > 65535:
|
||||||
# Skip updating limits if already sufficient
|
# Skip updating limits if already sufficient
|
||||||
# (enables running in incus containers where sysctl readonly)
|
# (enables running in incus containers where sysctl readonly)
|
||||||
continue
|
continue
|
||||||
server.sysctl(
|
server.sysctl(
|
||||||
name=f"Change {key}",
|
name=f"Change {key}",
|
||||||
key=key,
|
key=key,
|
||||||
|
|||||||
@@ -118,7 +118,9 @@ def test_authenticated_from(cmsetup, maildata):
|
|||||||
@pytest.mark.parametrize("from_addr", ["fake@example.org", "fake@testrun.org"])
|
@pytest.mark.parametrize("from_addr", ["fake@example.org", "fake@testrun.org"])
|
||||||
def test_reject_missing_dkim(cmsetup, maildata, from_addr):
|
def test_reject_missing_dkim(cmsetup, maildata, from_addr):
|
||||||
recipient = cmsetup.gen_users(1)[0]
|
recipient = cmsetup.gen_users(1)[0]
|
||||||
msg = maildata("encrypted.eml", from_addr=from_addr, to_addr=recipient.addr).as_string()
|
msg = maildata(
|
||||||
|
"encrypted.eml", from_addr=from_addr, to_addr=recipient.addr
|
||||||
|
).as_string()
|
||||||
try:
|
try:
|
||||||
conn = smtplib.SMTP(cmsetup.maildomain, 25, timeout=10)
|
conn = smtplib.SMTP(cmsetup.maildomain, 25, timeout=10)
|
||||||
except TimeoutError:
|
except TimeoutError:
|
||||||
@@ -183,7 +185,9 @@ def test_expunged(remote, chatmail_config):
|
|||||||
f"find {chatmail_config.mailboxes_dir} -path '*/.*/tmp/*' -mtime +{outdated_days} -type f",
|
f"find {chatmail_config.mailboxes_dir} -path '*/.*/tmp/*' -mtime +{outdated_days} -type f",
|
||||||
]
|
]
|
||||||
outdated_days = int(chatmail_config.delete_large_after) + 1
|
outdated_days = int(chatmail_config.delete_large_after) + 1
|
||||||
find_cmds.append("find {chatmail_config.mailboxes_dir} -path '*/cur/*' -mtime +{outdated_days} -size +200k -type f")
|
find_cmds.append(
|
||||||
|
"find {chatmail_config.mailboxes_dir} -path '*/cur/*' -mtime +{outdated_days} -size +200k -type f"
|
||||||
|
)
|
||||||
for cmd in find_cmds:
|
for cmd in find_cmds:
|
||||||
for line in remote.iter_output(cmd):
|
for line in remote.iter_output(cmd):
|
||||||
assert not line
|
assert not line
|
||||||
|
|||||||
@@ -307,6 +307,7 @@ def cmfactory(request, gencreds, tmpdir, maildomain):
|
|||||||
class Data:
|
class Data:
|
||||||
def read_path(self, path):
|
def read_path(self, path):
|
||||||
return
|
return
|
||||||
|
|
||||||
am = ACFactory(request=request, tmpdir=tmpdir, testprocess=testproc, data=Data())
|
am = ACFactory(request=request, tmpdir=tmpdir, testprocess=testproc, data=Data())
|
||||||
|
|
||||||
# nb. a bit hacky
|
# nb. a bit hacky
|
||||||
|
|||||||
Reference in New Issue
Block a user