From: Remi Gacogne Date: Thu, 30 Nov 2017 14:29:30 +0000 (+0100) Subject: rec: Normalize the TTLs for default.example.net. in the RPZ tests X-Git-Tag: rec-4.1.0~8^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F6027%2Fhead;p=thirdparty%2Fpdns.git rec: Normalize the TTLs for default.example.net. in the RPZ tests Since we ask for several records that are CNAME to default.example.net. the TTL might have been decreased by the time we get to the last ones. That's fine, the TTL we are interested in are for other records, so we can just ignore the TTL for this exact record. --- diff --git a/regression-tests.recursor/RPZ/command b/regression-tests.recursor/RPZ/command index 6de706fe8a..2d54e2bcc7 100755 --- a/regression-tests.recursor/RPZ/command +++ b/regression-tests.recursor/RPZ/command @@ -21,11 +21,11 @@ $SDIG $nameserver 5301 capped-ttl.example.net a recurse 2>&1 echo "==> defpol-with-ttl.example.net should use the default policy's TTL and not the zone one" $SDIG $nameserver 5301 defpol-with-ttl.example.net a recurse 2>&1 echo "==> defpol-with-ttl-capped.example.net should use the default policy's TTL, but capped to maxTTL" -$SDIG $nameserver 5301 defpol-with-ttl-capped.example.net a recurse 2>&1 +$SDIG $nameserver 5301 defpol-with-ttl-capped.example.net a recurse 2>&1 | sed 's/\(0\tdefault.example.net.\tIN\t[A-Z0-9]\+\t\)\([0-9]\+\)/\115/' echo "==> defpol-without-ttl.example.net should use the zone's TTL" -$SDIG $nameserver 5301 defpol-without-ttl.example.net a recurse 2>&1 +$SDIG $nameserver 5301 defpol-without-ttl.example.net a recurse 2>&1 | sed 's/\(0\tdefault.example.net.\tIN\t[A-Z0-9]\+\t\)\([0-9]\+\)/\115/' echo "==> defpol-without-ttl-capped.example.net should use the zone's TTL but capped to maxTTL" -$SDIG $nameserver 5301 defpol-without-ttl-capped.example.net a recurse 2>&1 +$SDIG $nameserver 5301 defpol-without-ttl-capped.example.net a recurse 2>&1 | sed 's/\(0\tdefault.example.net.\tIN\t[A-Z0-9]\+\t\)\([0-9]\+\)/\115/' echo "==> unsupported.example.net has an unsupported target, should be ignored from the RPZ zone" $SDIG $nameserver 5301 unsupported.example.net a recurse 2>&1 echo "==> unsupported2.example.net has an unsupported target, should be ignored from the RPZ zone"