diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 9d01b75516f7..2d85c5f06001 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -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; diff --git a/nixos/tests/scanservjs.nix b/nixos/tests/scanservjs.nix new file mode 100644 index 000000000000..009b00a51d8e --- /dev/null +++ b/nixos/tests/scanservjs.nix @@ -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}" + ) + ''; +}