mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
nixosTests.powerdns: fix test script for type checking
This commit is contained in:
parent
83657ee160
commit
aaebb21a9e
1 changed files with 3 additions and 1 deletions
|
@ -47,7 +47,9 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
|
||||||
with subtest("Adding an example zone works"):
|
with subtest("Adding an example zone works"):
|
||||||
# Extract configuration file needed by pdnsutil
|
# Extract configuration file needed by pdnsutil
|
||||||
unit = server.succeed("systemctl cat pdns")
|
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
|
pdnsutil = "sudo -u pdns pdnsutil " + conf
|
||||||
server.succeed(f"{pdnsutil} create-zone example.com ns1.example.com")
|
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")
|
server.succeed(f"{pdnsutil} add-record example.com ns1 A 192.168.1.2")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue