nixosTests.scanservjs: init
Test that the service runs and uses our configured (TCP) port. This should prevent https://github.com/NixOS/nixpkgs/issues/475043 ("nixos/scanservjs: settings (host/port) ignored in v3.0.4") from happening again.
This commit is contained in:
@@ -1489,6 +1489,7 @@ in
|
||||
sane = runTest ./sane.nix;
|
||||
sanoid = runTest ./sanoid.nix;
|
||||
saunafs = runTest ./saunafs.nix;
|
||||
scanservjs = runTest ./scanservjs.nix;
|
||||
scaphandre = runTest ./scaphandre.nix;
|
||||
schleuder = runTest ./schleuder.nix;
|
||||
scion-freestanding-deployment = runTest ./scion/freestanding-deployment;
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
let
|
||||
port = 1234;
|
||||
in
|
||||
{
|
||||
name = "scanservjs";
|
||||
|
||||
nodes.machine =
|
||||
{ ... }:
|
||||
{
|
||||
services.scanservjs = {
|
||||
enable = true;
|
||||
settings.host = "0.0.0.0";
|
||||
settings.port = port;
|
||||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
machine.wait_for_unit("scanservjs.service")
|
||||
machine.wait_until_succeeds(
|
||||
"curl --silent --fail --show-error --location http://localhost:${toString port}"
|
||||
)
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user