about summary refs log tree commit diff
path: root/nixos/tests/powerdns.nix
diff options
context:
space:
mode:
authorNick Cao <nickcao@nichi.co>2022-07-30 16:29:16 +0800
committerNick Cao <nickcao@nichi.co>2022-07-30 16:29:16 +0800
commitaaebb21a9e6104106eb0c208c114e8f13ad38649 (patch)
tree6801b3f6867a81cbe5b97ae1b7a2ba068faadb96 /nixos/tests/powerdns.nix
parent83657ee1601ce7535211e6ae3737004c16a09bd9 (diff)
nixosTests.powerdns: fix test script for type checking
Diffstat (limited to 'nixos/tests/powerdns.nix')
-rw-r--r--nixos/tests/powerdns.nix4
1 files changed, 3 insertions, 1 deletions
diff --git a/nixos/tests/powerdns.nix b/nixos/tests/powerdns.nix
index 70060bad87b69..d3708d25f0fbf 100644
--- a/nixos/tests/powerdns.nix
+++ b/nixos/tests/powerdns.nix
@@ -47,7 +47,9 @@ 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")
-        conf = re.search("(--config-dir=[^ ]+)", unit).group(1)
+        match = re.search("(--config-dir=[^ ]+)", unit)
+        assert(match is not None)
+        conf = match.group(1)
         pdnsutil = "sudo -u pdns pdnsutil " + conf
         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")