git.iko.soy/typeable/nixpkgs
on master help sign in
tests/pdns-recursor: use waitForOpenPort as port check

This should be safer w.r.t. race conditions.

commit4aeafc6b63fbf9b0207ce51a3bbf0bc81c807115 authorJörg Thalheim <joerg@thalheim.io> dateFri 5 Apr 2019, 02:27 (8 years ago) parente49a143
1 file changed+2−2
nixos/tests/pdns-recursor.nix+2−2
nixos/tests/pdns-recursor.nix+2−2
@@ -1,4 +1,4 @@
1−import ./make-test.nix ({ pkgs, lib, ... }: {
1+import ./make-test.nix ({ pkgs, ... }: {
22 name = "powerdns";
33
44 nodes.server = { ... }: {
@@ -7,6 +7,6 @@ import ./make-test.nix ({ pkgs, lib, ... }: {
77
88 testScript = ''
99 $server->waitForUnit("pdns-recursor");
10− $server->succeed("echo | ${lib.getBin pkgs.netcat}/bin/nc -v localhost 53")
10+ $server->waitForOpenPort("53");
1111 '';
1212})