at 23.11-pre 825 B view raw
1import ./make-test-python.nix ({ pkgs, ...} : { 2 name = "novacomd"; 3 meta = with pkgs.lib.maintainers; { 4 maintainers = [ dtzWill ]; 5 }; 6 7 nodes.machine = { ... }: { 8 services.novacomd.enable = true; 9 }; 10 11 testScript = '' 12 machine.wait_for_unit("novacomd.service") 13 14 with subtest("Make sure the daemon is really listening"): 15 machine.wait_for_open_port(6968) 16 machine.succeed("novacom -l") 17 18 with subtest("Stop the daemon, double-check novacom fails if daemon isn't working"): 19 machine.stop_job("novacomd") 20 machine.fail("novacom -l") 21 22 with subtest("Make sure the daemon starts back up again"): 23 machine.start_job("novacomd") 24 # make sure the daemon is really listening 25 machine.wait_for_open_port(6968) 26 machine.succeed("novacom -l") 27 ''; 28})