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