Tests - fix PTR test

Signed-off-by: Rob Gill <rrobgill@protonmail.com>
This commit is contained in:
Rob Gill
2025-06-12 08:16:18 +10:00
parent 82839e1490
commit 484e9aad4a

View File

@@ -14,7 +14,7 @@ getIPs() {
while IFS= read -r addr ; do
# Check if Pi-hole can use itself to block a domain
dig_result=$(dig +tries=1 +time=2 -x "${addr}" @127.0.0.1 +short)
if [[ $addr == "127.0.0.1" && $dig_result == "localhost." ]] || [[ $addr == "::1" && [[ $dig_result == "localhost." || $dig_result == "ip6-localhost." ]] ]] || [[ $dig_result == "pi.hole." ]]; then
if [[ $addr == "127.0.0.1" && $dig_result == "localhost." ]] || [[ $addr == "::1" && ( $dig_result == "localhost." || $dig_result == "ip6-localhost." ) ]] || [[ $dig_result == "pi.hole." ]]; then
echo "${addr} is \"${dig_result}\": OK"
else
# Otherwise, show a failure