mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 13:40:28 +03:00
nixos/zwave-js-ui: init module
Provides systemd service and allows configuration of data directory
This commit is contained in:
parent
a322c9280a
commit
d7ba3b54d8
5 changed files with 155 additions and 0 deletions
|
@ -1161,4 +1161,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 {};
|
||||
}
|
||||
|
|
31
nixos/tests/zwave-js-ui.nix
Normal file
31
nixos/tests/zwave-js-ui.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
import ./make-test-python.nix (
|
||||
{ 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";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
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/nodes.json")
|
||||
'';
|
||||
}
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue