1# #-- edns_cache.test --# 2# source the master var file when it's there 3[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master 4# use .tpkg.var.test for in test variable passing 5[ -f .tpkg.var.test ] && source .tpkg.var.test 6 7# notice that we use one stub server on IPv6 ::1 that supports EDNS that 8# gives referrals to the other server on IPv4 127.0.0.1 that is nonEDNS. 9 10PRE="../.." 11# do the test 12echo "> dig netdns.example.net." 13dig @::1 -p $UNBOUND_PORT netdns.example.net. | tee outfile 14echo "> dig www.example.net." 15dig @::1 -p $UNBOUND_PORT www.example.net. | tee outfile 16echo "> cat stub1.log" 17cat stub1.log 18echo "> cat stub2.log" 19cat stub2.log 20echo "> cat unbound.log" 21cat unbound.log 22echo "> check answer" 23if grep "10.20.30.40" outfile; then 24 echo "OK" 25else 26 echo "Not OK" 27 exit 1 28fi 29 30exit 0 31