Setup rspamd controller to serve web UI assets
This commit is contained in:
parent
31cf3818df
commit
45f80def41
2 changed files with 7 additions and 0 deletions
|
@ -87,6 +87,9 @@ in
|
||||||
mode = "0666";
|
mode = "0666";
|
||||||
}];
|
}];
|
||||||
includes = [];
|
includes = [];
|
||||||
|
extraConfig = ''
|
||||||
|
static_dir = "''${WWWDIR}"; # Serve the web UI static assets
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -81,5 +81,9 @@ import (pkgs.path + "/nixos/tests/make-test.nix") {
|
||||||
$machine->waitUntilSucceeds("timeout 1 ${pkgs.netcat}/bin/nc -U /run/rspamd/rspamd-milter.sock < /dev/null; [ \$? -eq 124 ]");
|
$machine->waitUntilSucceeds("timeout 1 ${pkgs.netcat}/bin/nc -U /run/rspamd/rspamd-milter.sock < /dev/null; [ \$? -eq 124 ]");
|
||||||
$machine->succeed("cat ${sendMail} | ${pkgs.netcat-gnu}/bin/nc localhost 25 | grep -q 'This account cannot receive emails'" );
|
$machine->succeed("cat ${sendMail} | ${pkgs.netcat-gnu}/bin/nc localhost 25 | grep -q 'This account cannot receive emails'" );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
subtest "rspamd controller serves web ui", sub {
|
||||||
|
$machine->succeed("${pkgs.curl}/bin/curl --unix-socket /run/rspamd/worker-controller.sock http://localhost/ | grep -q '<body>'" );
|
||||||
|
};
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue