1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-25 15:11:35 +00:00
nixpkgs/nixos/tests/novacomd.nix
Dominik Xaver Hörl 25bef2d8f9 treewide: simplify pkgs.stdenv.lib -> pkgs.lib
The library does not depend on stdenv, that `stdenv` exposes `lib` is
an artifact of the ancient origins of nixpkgs.
2021-01-10 20:12:06 +01:00

29 lines
819 B
Nix

import ./make-test-python.nix ({ pkgs, ...} : {
name = "novacomd";
meta = with pkgs.lib.maintainers; {
maintainers = [ dtzWill ];
};
machine = { ... }: {
services.novacomd.enable = true;
};
testScript = ''
machine.wait_for_unit("novacomd.service")
with subtest("Make sure the daemon is really listening"):
machine.wait_for_open_port(6968)
machine.succeed("novacom -l")
with subtest("Stop the daemon, double-check novacom fails if daemon isn't working"):
machine.stop_job("novacomd")
machine.fail("novacom -l")
with subtest("Make sure the daemon starts back up again"):
machine.start_job("novacomd")
# make sure the daemon is really listening
machine.wait_for_open_port(6968)
machine.succeed("novacom -l")
'';
})