feat(mailu): add ops.py + backup/restore tests + update PARITY.md (P4 now covered via PR#3)
This commit is contained in:
26
tests/mailu/test_restore.py
Normal file
26
tests/mailu/test_restore.py
Normal file
@ -0,0 +1,26 @@
|
||||
"""mailu — RESTORE overlay: assert the seeded mailbox is back after restore.
|
||||
|
||||
ops.pre_restore deleted citest@<domain> from the admin sqlite to simulate data loss; this
|
||||
overlay verifies that abra app restore brings the user back (the /data sqlite volume is
|
||||
restored from the backup taken by pre_backup, which contained the seeded user)."""
|
||||
|
||||
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_restore_returns_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 after restore; "
|
||||
f"restore did not return the pre-mutation mail data. "
|
||||
f"users present: {emails}"
|
||||
)
|
||||
Reference in New Issue
Block a user