Merge pull request #46063 from xeji/p/novacomd-test
nixos/tests/novacomd: prevent non-deterministic failure
This commit is contained in:
commit
8dc63ce9aa
@ -9,12 +9,16 @@ import ./make-test.nix ({ pkgs, ...} : {
|
|||||||
};
|
};
|
||||||
|
|
||||||
testScript = ''
|
testScript = ''
|
||||||
startAll;
|
$machine->waitForUnit("multi-user.target");
|
||||||
|
|
||||||
|
# multi-user.target wants novacomd.service, but let's make sure
|
||||||
$machine->waitForUnit("novacomd.service");
|
$machine->waitForUnit("novacomd.service");
|
||||||
|
|
||||||
# Check status and try connecting with novacom
|
# Check status and try connecting with novacom
|
||||||
$machine->succeed("systemctl status novacomd.service >&2");
|
$machine->succeed("systemctl status novacomd.service >&2");
|
||||||
|
# to prevent non-deterministic failure,
|
||||||
|
# make sure the daemon is really listening
|
||||||
|
$machine->waitForOpenPort(6968);
|
||||||
$machine->succeed("novacom -l");
|
$machine->succeed("novacom -l");
|
||||||
|
|
||||||
# Stop the daemon, double-check novacom fails if daemon isn't working
|
# Stop the daemon, double-check novacom fails if daemon isn't working
|
||||||
@ -23,6 +27,8 @@ import ./make-test.nix ({ pkgs, ...} : {
|
|||||||
|
|
||||||
# And back again for good measure
|
# And back again for good measure
|
||||||
$machine->startJob("novacomd");
|
$machine->startJob("novacomd");
|
||||||
|
# make sure the daemon is really listening
|
||||||
|
$machine->waitForOpenPort(6968);
|
||||||
$machine->succeed("novacom -l");
|
$machine->succeed("novacom -l");
|
||||||
'';
|
'';
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user