mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
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:
parent
008e87e5c2
commit
32157e1c52
2 changed files with 24 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
23
nixos/tests/scanservjs.nix
Normal file
23
nixos/tests/scanservjs.nix
Normal file
|
|
@ -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}"
|
||||
)
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue