From b67cc6298e366aae63a381a895cf21c3b75ed649 Mon Sep 17 00:00:00 2001 From: Andreas Rammhold Date: Fri, 23 Oct 2020 22:14:28 +0200 Subject: [PATCH] nixos/tests/unbound: add test to verify control sockets work --- nixos/tests/unbound.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/nixos/tests/unbound.nix b/nixos/tests/unbound.nix index bbccfa9c043a..9a7a652b4052 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") ''; })