nixos/tests/headscale: test dns records config

This commit is contained in:
TakodaS
2025-03-04 18:25:53 +00:00
committed by Sandro Jäckel
parent 6c46327d7d
commit ce6c940c90

View File

@@ -45,6 +45,13 @@ in
};
dns = {
base_domain = "tailnet";
extra_records = [
{
name = "foo.bar";
type = "A";
value = "100.64.0.2";
}
];
override_local_dns = false;
};
};
@@ -90,5 +97,6 @@ in
# Check that they are reachable from the tailnet
peer1.wait_until_succeeds("tailscale ping peer2")
peer2.wait_until_succeeds("tailscale ping peer1.tailnet")
assert (res := peer1.wait_until_succeeds("${lib.getExe pkgs.dig} +short foo.bar").strip()) == "100.64.0.2", f"Domain {res} did not match 100.64.0.2"
'';
}