nixos/tests/headscale: test dns records config
This commit is contained in:
@@ -45,6 +45,13 @@ in
|
|||||||
};
|
};
|
||||||
dns = {
|
dns = {
|
||||||
base_domain = "tailnet";
|
base_domain = "tailnet";
|
||||||
|
extra_records = [
|
||||||
|
{
|
||||||
|
name = "foo.bar";
|
||||||
|
type = "A";
|
||||||
|
value = "100.64.0.2";
|
||||||
|
}
|
||||||
|
];
|
||||||
override_local_dns = false;
|
override_local_dns = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -90,5 +97,6 @@ in
|
|||||||
# Check that they are reachable from the tailnet
|
# Check that they are reachable from the tailnet
|
||||||
peer1.wait_until_succeeds("tailscale ping peer2")
|
peer1.wait_until_succeeds("tailscale ping peer2")
|
||||||
peer2.wait_until_succeeds("tailscale ping peer1.tailnet")
|
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"
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user