summary refs log tree commit diff
path: root/nixos/tests/unbound.nix
diff options
context:
space:
mode:
authorAndreas Rammhold <andreas@rammhold.de>2020-10-23 22:14:28 +0200
committerAndreas Rammhold <andreas@rammhold.de>2020-11-03 19:21:24 +0100
commitb67cc6298e366aae63a381a895cf21c3b75ed649 (patch)
tree24efd8c8d378f0064456c4cb1762e102232665f7 /nixos/tests/unbound.nix
parenta040a8a2e3e598d24be81d36b66fd8c195c019da (diff)
downloadnixpkgs-b67cc6298e366aae63a381a895cf21c3b75ed649.tar
nixpkgs-b67cc6298e366aae63a381a895cf21c3b75ed649.tar.gz
nixpkgs-b67cc6298e366aae63a381a895cf21c3b75ed649.tar.bz2
nixpkgs-b67cc6298e366aae63a381a895cf21c3b75ed649.tar.lz
nixpkgs-b67cc6298e366aae63a381a895cf21c3b75ed649.tar.xz
nixpkgs-b67cc6298e366aae63a381a895cf21c3b75ed649.tar.zst
nixpkgs-b67cc6298e366aae63a381a895cf21c3b75ed649.zip
nixos/tests/unbound: add test to verify control sockets work
Diffstat (limited to 'nixos/tests/unbound.nix')
-rw-r--r--nixos/tests/unbound.nix11
1 files changed, 11 insertions, 0 deletions
diff --git a/nixos/tests/unbound.nix b/nixos/tests/unbound.nix
index bbccfa9c043..9a7a652b405 100644
--- a/nixos/tests/unbound.nix
+++ b/nixos/tests/unbound.nix
@@ -132,6 +132,12 @@ import ./make-test-python.nix ({ pkgs, lib, ... }:
                 something.local. IN A 3.4.5.6
               ''}
           '';
+          "unbound-extra3.conf".text = ''
+            remote-control:
+              control-enable: yes
+              control-interface: /run/unbound/unbound.ctl
+          '';
+
         };
       };
 
@@ -243,5 +249,10 @@ import ./make-test-python.nix ({ pkgs, lib, ... }:
           local_resolver.succeed("systemctl reload unbound")
           r = [("A", "3.4.5.6")]
           test(local_resolver, ["::1", "127.0.0.1"], zone="something.local.", records=r)
+
+      with subtest("test that we can enable unbound control sockets on the fly"):
+          local_resolver.succeed("ln -sf /etc/unbound-extra3.conf /etc/unbound/extra3.conf")
+          local_resolver.succeed("systemctl reload unbound")
+          local_resolver.succeed("unbound-control list_forwards")
     '';
   })