mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-14 22:04:27 +01:00
b2fccae809
Co-authored-by: Martin Weinelt <mweinelt@users.noreply.github.com> Co-authored-by: h7x4 <h7x4@nani.wtf>
31 lines
763 B
Nix
31 lines
763 B
Nix
import ./make-test-python.nix ({ pkgs, lib, ...} :
|
|
|
|
let
|
|
secretsConfigFile = pkgs.writeText "secrets.json" (builtins.toJSON {
|
|
securityKeys = {
|
|
"S0_Legacy" = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
|
|
};
|
|
});
|
|
in {
|
|
name = "zwave-js";
|
|
meta.maintainers = with lib.maintainers; [ graham33 ];
|
|
|
|
nodes = {
|
|
machine = { config, ... }: {
|
|
services.zwave-js = {
|
|
enable = true;
|
|
serialPort = "/dev/null";
|
|
extraFlags = ["--mock-driver"];
|
|
inherit secretsConfigFile;
|
|
};
|
|
};
|
|
};
|
|
|
|
testScript = ''
|
|
start_all()
|
|
|
|
machine.wait_for_unit("zwave-js.service")
|
|
machine.wait_for_open_port(3000)
|
|
machine.wait_until_succeeds("journalctl --since -1m --unit zwave-js --grep 'ZwaveJS server listening'")
|
|
'';
|
|
})
|