···
1
-
import ./make-test.nix ({ pkgs, ...} : {
1
+
import ./make-test-python.nix ({ pkgs, ...} : {
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ dtzWill ];
···
12
-
$machine->waitForUnit("multi-user.target");
14
-
# multi-user.target wants novacomd.service, but let's make sure
15
-
$machine->waitForUnit("novacomd.service");
12
+
machine.wait_for_unit("novacomd.service")
17
-
# Check status and try connecting with novacom
18
-
$machine->succeed("systemctl status novacomd.service >&2");
19
-
# to prevent non-deterministic failure,
20
-
# make sure the daemon is really listening
21
-
$machine->waitForOpenPort(6968);
22
-
$machine->succeed("novacom -l");
14
+
with subtest("Make sure the daemon is really listening"):
15
+
machine.wait_for_open_port(6968)
16
+
machine.succeed("novacom -l")
24
-
# Stop the daemon, double-check novacom fails if daemon isn't working
25
-
$machine->stopJob("novacomd");
26
-
$machine->fail("novacom -l");
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")
28
-
# And back again for good measure
29
-
$machine->startJob("novacomd");
30
-
# make sure the daemon is really listening
31
-
$machine->waitForOpenPort(6968);
32
-
$machine->succeed("novacom -l");
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")