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 {};
zsh-history = handleTest ./zsh-history.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, ... }:
{
name = "zwave-js-ui";
meta.maintainers = with lib.maintainers; [ cdombroski ];
{ lib, ... }:
{
name = "zwave-js-ui";
meta.maintainers = with lib.maintainers; [ cdombroski ];
nodes = {
machine =
{ ... }:
{
services.zwave-js-ui = {
enable = true;
serialPort = "/dev/null";
settings = {
HOST = "::";
PORT = "9999";
};
nodes = {
machine =
{ ... }:
{
services.zwave-js-ui = {
enable = true;
serialPort = "/dev/null";
settings = {
HOST = "::";
PORT = "9999";
};
};
};
};
};
testScript = ''
start_all()
testScript = ''
start_all()
machine.wait_for_unit("zwave-js-ui.service")
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_for_file("/var/lib/zwave-js-ui/users.json")
'';
}
)
machine.wait_for_unit("zwave-js-ui.service")
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_for_file("/var/lib/zwave-js-ui/users.json")
'';
}