cmdeploy fmt

This commit is contained in:
missytake
2025-05-15 14:36:40 +02:00
parent 0c28310861
commit 6c27eaa506
3 changed files with 8 additions and 3 deletions

View File

@@ -367,7 +367,7 @@ def _configure_dovecot(config: Config, debug: bool = False) -> bool:
if host.get_fact(Sysctl)[key] > 65535:
# Skip updating limits if already sufficient
# (enables running in incus containers where sysctl readonly)
continue
continue
server.sysctl(
name=f"Change {key}",
key=key,

View File

@@ -118,7 +118,9 @@ def test_authenticated_from(cmsetup, maildata):
@pytest.mark.parametrize("from_addr", ["fake@example.org", "fake@testrun.org"])
def test_reject_missing_dkim(cmsetup, maildata, from_addr):
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:
conn = smtplib.SMTP(cmsetup.maildomain, 25, timeout=10)
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",
]
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 line in remote.iter_output(cmd):
assert not line

View File

@@ -307,6 +307,7 @@ def cmfactory(request, gencreds, tmpdir, maildomain):
class Data:
def read_path(self, path):
return
am = ACFactory(request=request, tmpdir=tmpdir, testprocess=testproc, data=Data())
# nb. a bit hacky