Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

nixos/tests/pdns-recursor: test old-settings

(cherry picked from commit 13accc23b088b7f721e76afd39adaa4e5aa01409)

authored by rnhmjoj and committed by github-actions[bot] 77406f7c fb77c246

Changed files
+21 -16
nixos
+1 -1
nixos/tests/all-tests.nix
··· 1018 1018 paperless = handleTest ./paperless.nix { }; 1019 1019 parsedmarc = handleTest ./parsedmarc { }; 1020 1020 password-option-override-ordering = handleTest ./password-option-override-ordering.nix { }; 1021 - pdns-recursor = handleTest ./pdns-recursor.nix { }; 1021 + pdns-recursor = runTest ./pdns-recursor.nix; 1022 1022 pds = handleTest ./pds.nix { }; 1023 1023 peerflix = handleTest ./peerflix.nix { }; 1024 1024 peering-manager = handleTest ./web-apps/peering-manager.nix { };
+20 -15
nixos/tests/pdns-recursor.nix
··· 1 - import ./make-test-python.nix ( 2 - { pkgs, ... }: 3 - { 4 - name = "powerdns-recursor"; 1 + { lib, pkgs, ... }: 5 2 6 - nodes.server = 7 - { ... }: 8 - { 9 - services.pdns-recursor.enable = true; 10 - services.pdns-recursor.exportHosts = true; 11 - networking.hosts."192.0.2.1" = [ "example.com" ]; 12 - }; 3 + { 4 + name = "powerdns-recursor"; 5 + meta.maintainers = with lib.maintainers; [ rnhmjoj ]; 6 + 7 + nodes.server = { 8 + services.pdns-recursor.enable = true; 9 + services.pdns-recursor.exportHosts = true; 10 + services.pdns-recursor.old-settings.dnssec-log-bogus = true; 11 + networking.hosts."192.0.2.1" = [ "example.com" ]; 12 + }; 13 13 14 - testScript = '' 14 + testScript = '' 15 + with subtest("pdns-recursor is running"): 15 16 server.wait_for_unit("pdns-recursor") 16 17 server.wait_for_open_port(53) 18 + 19 + with subtest("can resolve names"): 17 20 assert "192.0.2.1" in server.succeed("host example.com localhost") 18 - ''; 19 - } 20 - ) 21 + 22 + with subtest("old-settings have been merged in"): 23 + server.succeed("${lib.getExe pkgs.yq-go} -e .dnssec.log_bogus /etc/pdns-recursor/recursor.yml") 24 + ''; 25 + }