nixos/mailman: store locks in ephemeral runtime directory

nixosTests.mailman: test mailman master lock handling
This commit is contained in:
Molly Miller 2023-10-06 10:34:54 +02:00 committed by Alyssa Ross
parent 6ebe8cd150
commit 1a794a3e4b
2 changed files with 7 additions and 1 deletions

View File

@ -314,7 +314,7 @@ in {
queue_dir = "$var_dir/queue";
template_dir = "$var_dir/templates";
log_dir = "/var/log/mailman";
lock_dir = "$var_dir/lock";
lock_dir = "/run/mailman/lock";
etc_dir = "/etc";
pid_file = "/run/mailman/master.pid";
};

View File

@ -63,5 +63,11 @@ import ./make-test-python.nix {
wait_for_api()
machine.succeed("curl --fail-with-body -sLSu restadmin:secretpassword http://localhost:8001/3.1/domains")
machine.succeed("curl --fail-with-body -sILS http://localhost/")
with subtest("service locking"):
machine.fail("su -s /bin/sh -c 'mailman start' mailman")
machine.execute("systemctl kill --signal=SIGKILL mailman")
machine.succeed("systemctl restart mailman")
wait_for_api()
'';
}