diff options
author | Andreas Rammhold <andreas@rammhold.de> | 2020-10-23 22:14:28 +0200 |
---|---|---|
committer | Andreas Rammhold <andreas@rammhold.de> | 2020-11-03 19:21:24 +0100 |
commit | b67cc6298e366aae63a381a895cf21c3b75ed649 (patch) | |
tree | 24efd8c8d378f0064456c4cb1762e102232665f7 /nixos/tests | |
parent | a040a8a2e3e598d24be81d36b66fd8c195c019da (diff) |
nixos/tests/unbound: add test to verify control sockets work
Diffstat (limited to 'nixos/tests')
-rw-r--r-- | nixos/tests/unbound.nix | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/nixos/tests/unbound.nix b/nixos/tests/unbound.nix index bbccfa9c043ab..9a7a652b4052f 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") ''; }) |