1 # #-- dnstap_tls_badname.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
9 if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
11 # test if the server is up.
12 echo "> dig www.example.com."
13 dig @127.0.0.1 -p $UNBOUND_PORT www.example.com. | tee outfile
15 if grep "10.20.30.40" outfile; then
27 echo "> check tap.log for dnstap info"
28 # see if it logged the information in tap.log
29 # wait for a moment for filesystem to catch up.
30 if grep "www.example.com" tap.log >/dev/null; then :; else sleep 1; fi
31 if grep "www.example.com" tap.log >/dev/null; then :; else sleep 1; fi
32 if grep "www.example.com" tap.log >/dev/null; then :; else sleep 1; fi
33 if grep "www.example.com" tap.log >/dev/null; then :; else sleep 1; fi
34 if grep "www.example.com" tap.log >/dev/null; then :; else sleep 1; fi
35 if grep "www.example.com" tap.log; then
36 echo "it is in tap.log";
37 echo "but there should not be a connection"
47 echo "information not in tap.log"