summary refs log tree commit diff
diff options
context:
space:
mode:
authorTQ Hirsch <thequux@thequux.com>2023-02-25 17:02:36 +0100
committerNick Cao <nickcao@nichi.co>2023-07-01 18:55:50 +0800
commit8ab22ad2ad166a75e517bc3d0a6625d3e3f4517a (patch)
treef7205dc3b89f7006aa65e7d9190c75fd12e8d565
parentd25e5e21070cbacaa33361254a6a0b1e2e7c0e04 (diff)
downloadnixpkgs-8ab22ad2ad166a75e517bc3d0a6625d3e3f4517a.tar
nixpkgs-8ab22ad2ad166a75e517bc3d0a6625d3e3f4517a.tar.gz
nixpkgs-8ab22ad2ad166a75e517bc3d0a6625d3e3f4517a.tar.bz2
nixpkgs-8ab22ad2ad166a75e517bc3d0a6625d3e3f4517a.tar.lz
nixpkgs-8ab22ad2ad166a75e517bc3d0a6625d3e3f4517a.tar.xz
nixpkgs-8ab22ad2ad166a75e517bc3d0a6625d3e3f4517a.tar.zst
nixpkgs-8ab22ad2ad166a75e517bc3d0a6625d3e3f4517a.zip
nixos/tests/powerdns: Stop manually configuring config path
-rw-r--r--nixos/tests/powerdns.nix8
1 files changed, 1 insertions, 7 deletions
diff --git a/nixos/tests/powerdns.nix b/nixos/tests/powerdns.nix
index d3708d25f0f..599d5ea67ef 100644
--- a/nixos/tests/powerdns.nix
+++ b/nixos/tests/powerdns.nix
@@ -28,8 +28,6 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
   };
 
   testScript = ''
-    import re
-
     with subtest("PowerDNS database exists"):
         server.wait_for_unit("mysql")
         server.succeed("echo 'SHOW DATABASES;' | sudo -u pdns mysql -u pdns >&2")
@@ -46,11 +44,7 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
 
     with subtest("Adding an example zone works"):
         # Extract configuration file needed by pdnsutil
-        unit = server.succeed("systemctl cat pdns")
-        match = re.search("(--config-dir=[^ ]+)", unit)
-        assert(match is not None)
-        conf = match.group(1)
-        pdnsutil = "sudo -u pdns pdnsutil " + conf
+        pdnsutil = "sudo -u pdns pdnsutil "
         server.succeed(f"{pdnsutil} create-zone example.com ns1.example.com")
         server.succeed(f"{pdnsutil} add-record  example.com ns1 A 192.168.1.2")