1 import ./make-test-python.nix (
4 meta = with pkgs.lib; {
5 maintainers = with maintainers; [ jojosch ];
8 nodes.machine = { pkgs, lib, ... }: {
11 extraOptions = "empty-zones-enable no;";
12 zones = lib.singleton {
15 file = pkgs.writeText "root.zone" ''
17 . IN SOA ns.example.org. admin.example.org. ( 1 3h 1h 1w 1d )
18 . IN NS ns.example.org.
20 ns.example.org. IN A 192.168.0.1
21 ns.example.org. IN AAAA abcd::1
23 1.0.168.192.in-addr.arpa IN PTR ns.example.org.
31 newServer({address="127.0.0.1:53", name="local-bind"})
35 environment.systemPackages = with pkgs; [ dig ];
39 machine.wait_for_unit("bind.service")
40 machine.wait_for_open_port(53)
41 machine.succeed("dig @127.0.0.1 +short -x 192.168.0.1 | grep -qF ns.example.org")
43 machine.wait_for_unit("dnsdist.service")
44 machine.wait_for_open_port(5353)
45 machine.succeed("dig @127.0.0.1 -p 5353 +short -x 192.168.0.1 | grep -qF ns.example.org")