remove all occurences of hardcoded /home/vmail for database and mailbox dirs

This commit is contained in:
holger krekel
2024-07-09 20:35:57 +02:00
parent c8661fd135
commit fc09653de3
14 changed files with 42 additions and 30 deletions

View File

@@ -35,10 +35,13 @@ def test_read_config_testrun(make_config):
assert config.passthrough_senders == []
def test_get_user_maildir(make_config):
def test_config_userstate_paths(make_config, tmp_path):
config = make_config("something.testrun.org")
mailboxes_dir = Path(config.mailboxes_dir)
passdb_path = Path(config.passdb_path)
assert mailboxes_dir.name == "something.testrun.org"
assert passdb_path.name == "passdb.sqlite"
assert passdb_path.is_relative_to(tmp_path)
assert config.mail_domain == "something.testrun.org"
path = Path(config.get_user_maildir("user1@something.testrun.org"))
assert not path.exists()