about summary refs log tree commit diff
path: root/nixos/tests/dnscrypt-proxy2.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/tests/dnscrypt-proxy2.nix')
-rw-r--r--nixos/tests/dnscrypt-proxy2.nix6
1 files changed, 4 insertions, 2 deletions
diff --git a/nixos/tests/dnscrypt-proxy2.nix b/nixos/tests/dnscrypt-proxy2.nix
index 1ba5d983e9b92..4435d77bbf3b2 100644
--- a/nixos/tests/dnscrypt-proxy2.nix
+++ b/nixos/tests/dnscrypt-proxy2.nix
@@ -1,4 +1,6 @@
-import ./make-test-python.nix ({ pkgs, ... }: {
+import ./make-test-python.nix ({ pkgs, ... }: let
+  localProxyPort = 43;
+in {
   name = "dnscrypt-proxy2";
   meta = with pkgs.lib.maintainers; {
     maintainers = [ joachifm ];
@@ -9,7 +11,6 @@ import ./make-test-python.nix ({ pkgs, ... }: {
     # for a caching DNS client.
     client =
     { ... }:
-    let localProxyPort = 43; in
     {
       security.apparmor.enable = true;
 
@@ -32,5 +33,6 @@ import ./make-test-python.nix ({ pkgs, ... }: {
   testScript = ''
     client.wait_for_unit("dnsmasq")
     client.wait_for_unit("dnscrypt-proxy2")
+    client.wait_until_succeeds("ss --numeric --udp --listening | grep -q ${toString localProxyPort}")
   '';
 })