feat(mailu): add ops.py + backup/restore tests + update PARITY.md (P4 now covered via PR#3)
This commit is contained in:
25
tests/mailu/test_backup.py
Normal file
25
tests/mailu/test_backup.py
Normal file
@ -0,0 +1,25 @@
|
||||
"""mailu — BACKUP overlay: assert the seeded mailbox is present at backup time.
|
||||
|
||||
ops.pre_backup created citest@<domain> via the admin container; this overlay verifies the admin
|
||||
sqlite DB contains that user at the moment the backup is taken. The backup→restore divergence
|
||||
is in ops.pre_restore (which deletes the user before restore runs)."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
sys.path.insert(0, os.path.dirname(__file__))
|
||||
import _mailu # noqa: E402
|
||||
|
||||
_CI_LOCALPART = "citest"
|
||||
|
||||
|
||||
def test_backup_captures_mailbox(live_app):
|
||||
email = f"{_CI_LOCALPART}@{live_app}"
|
||||
cfg = _mailu.config_export(live_app)
|
||||
emails = _mailu.user_emails(cfg)
|
||||
assert email in emails, (
|
||||
f"seeded mailbox {email!r} not found in config-export at backup time; "
|
||||
f"users present: {emails}"
|
||||
)
|
||||
Reference in New Issue
Block a user