From: Lennart Poettering Date: Fri, 9 May 2025 08:28:53 +0000 (+0200) Subject: test: add simple integration test for delegation feature X-Git-Tag: v258-rc1~563^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=88d2cb366890c800b92d609aadbc351b8bbee19a;p=thirdparty%2Fsystemd.git test: add simple integration test for delegation feature --- diff --git a/test/knot-data/knot.conf b/test/knot-data/knot.conf index 6d177d72859..8519a6c7e57 100644 --- a/test/knot-data/knot.conf +++ b/test/knot-data/knot.conf @@ -5,6 +5,7 @@ server: user: knot:knot listen: 10.0.0.1@53 listen: fd00:dead:beef:cafe::1@53 + listen: 192.168.77.78@53 log: - target: syslog diff --git a/test/knot-data/zones/test.zone b/test/knot-data/zones/test.zone index 065ff7e2a00..75583c4ce6f 100644 --- a/test/knot-data/zones/test.zone +++ b/test/knot-data/zones/test.zone @@ -22,3 +22,5 @@ unsigned NS ns1.unsigned svcb SVCB 1 . alpn=dot ipv4hint=10.0.0.1 ipv6hint=fd00:dead:beef:cafe::1 https HTTPS 1 . alpn="h2,h3" + +delegation.excercise A 1.2.3.4 diff --git a/test/units/TEST-75-RESOLVED.sh b/test/units/TEST-75-RESOLVED.sh index be3a90385dc..6570febe796 100755 --- a/test/units/TEST-75-RESOLVED.sh +++ b/test/units/TEST-75-RESOLVED.sh @@ -1302,6 +1302,47 @@ testcase_15_wait_online_dns() { journalctl -b -u "$unit" --grep="dns0: link is configured by networkd and online." > /dev/null } +testcase_delegate() { + # Before we install the delegation file the DNS name should be directly resolveable via our DNS server + run resolvectl query delegation.excercise.test + grep -qF "1.2.3.4" "$RUN_OUT" + + mkdir -p /run/systemd/dns-delegate.d/ + cat >/run/systemd/dns-delegate.d/testcase.dns-delegate <