nixosTests.zwave-js-ui: migrate to runTest

Part Of #386873
This commit is contained in:
Martin Weinelt 2025-03-14 22:37:17 +01:00
parent fa5e562e6c
commit d8d1e397cb
No known key found for this signature in database
GPG key ID: 87C1E9888F856759
2 changed files with 25 additions and 27 deletions

View file

@ -1321,5 +1321,5 @@ in {
zrepl = handleTest ./zrepl.nix {}; zrepl = handleTest ./zrepl.nix {};
zsh-history = handleTest ./zsh-history.nix {}; zsh-history = handleTest ./zsh-history.nix {};
zwave-js = handleTest ./zwave-js.nix {}; zwave-js = handleTest ./zwave-js.nix {};
zwave-js-ui = handleTest ./zwave-js-ui.nix {}; zwave-js-ui = runTest ./zwave-js-ui.nix;
} }

View file

@ -1,31 +1,29 @@
import ./make-test-python.nix ( { lib, ... }:
{ lib, ... }: {
{ name = "zwave-js-ui";
name = "zwave-js-ui"; meta.maintainers = with lib.maintainers; [ cdombroski ];
meta.maintainers = with lib.maintainers; [ cdombroski ];
nodes = { nodes = {
machine = machine =
{ ... }: { ... }:
{ {
services.zwave-js-ui = { services.zwave-js-ui = {
enable = true; enable = true;
serialPort = "/dev/null"; serialPort = "/dev/null";
settings = { settings = {
HOST = "::"; HOST = "::";
PORT = "9999"; PORT = "9999";
};
}; };
}; };
}; };
};
testScript = '' testScript = ''
start_all() start_all()
machine.wait_for_unit("zwave-js-ui.service") machine.wait_for_unit("zwave-js-ui.service")
machine.wait_for_open_port(9999) machine.wait_for_open_port(9999)
machine.wait_until_succeeds("journalctl --since -1m --unit zwave-js-ui --grep 'Listening on port 9999host :: protocol HTTP'") machine.wait_until_succeeds("journalctl --since -1m --unit zwave-js-ui --grep 'Listening on port 9999host :: protocol HTTP'")
machine.wait_for_file("/var/lib/zwave-js-ui/users.json") machine.wait_for_file("/var/lib/zwave-js-ui/users.json")
''; '';
} }
)