Add rspamd web ui test

This commit is contained in:
Sandro Jäckel 2025-04-13 20:39:57 +02:00
parent 795aa39a02
commit 196b9b61e5
No known key found for this signature in database
GPG Key ID: 3AF5A43A3EECC2E5
2 changed files with 10 additions and 1 deletions

View File

@ -59,7 +59,6 @@ in
enable = true;
virtualHosts = {
"${cfg.rspamdWebUI.domain}" = {
forceSSL = true;
locations."/".proxyPass = "http://unix:/run/rspamd/worker-controller.sock:/";
};
};

View File

@ -81,6 +81,11 @@ pkgs.nixosTest {
vmailUID = 5000;
enableImap = false;
rspamdWebUI = {
enable = true;
domain = "localhost";
};
};
};
};
@ -185,6 +190,11 @@ pkgs.nixosTest {
"set +o pipefail; ${pkgs.curl}/bin/curl --unix-socket /run/rspamd/worker-controller.sock http://localhost/ | grep -q '<body>'"
)
with subtest("nginx serves web ui"):
machine.succeed(
"set +o pipefail; ${pkgs.curl}/bin/curl http://localhost/ | grep -q '<body>'"
)
with subtest("imap port 143 is closed and imaps is serving SSL"):
machine.wait_for_closed_port(143)
machine.wait_for_open_port(993)