${ttl} must exist and be non null

This commit is contained in:
Mark Andrews
2019-02-21 11:14:54 +11:00
committed by Michał Kępień
parent a85cc41486
commit dee1f1a498

View File

@@ -2795,10 +2795,10 @@ dig_with_answeropts expiring.example soa @10.53.0.4 > dig.out.ns4.2.$n
ttls=$(awk '$1 != ";;" {print $2}' dig.out.ns4.1.$n)
ttls2=$(awk '$1 != ";;" {print $2}' dig.out.ns4.2.$n)
for ttl in ${ttls:-0}; do
[ "${ttl:-0}" -eq 300 ] || ret=1
[ "${ttl}" -eq 300 ] || ret=1
done
for ttl in ${ttls2:-0}; do
[ "${ttl:-0}" -le 60 ] || ret=1
[ "${ttl}" -le 60 ] || ret=1
done
n=$((n+1))
test "$ret" -eq 0 || echo_i "failed"