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
10 # Make all the queries. They need to succeed by the way.
11 echo "> dig www.example.net."
12 dig @127.0.0.1 -p $UNBOUND_PORT www.example.net. | tee outfile
14 if grep "1.1.1.1" outfile; then
24 if grep "ipset: add 1.1.1.1 to atotallymadeupnamefor4 for www.example.net." unbound.log; then
34 echo "> dig www.example.net. AAAA"
35 dig @127.0.0.1 -p $UNBOUND_PORT www.example.net. AAAA | tee outfile
37 if grep "::1" outfile; then
47 if grep "ipset: add ::1 to atotallymadeupnamefor6 for www.example.net." unbound.log; then
57 echo "> dig cname.example.net."
58 dig @127.0.0.1 -p $UNBOUND_PORT cname.example.net. | tee outfile
60 if grep "2.2.2.2" outfile; then
70 if grep "ipset: add 2.2.2.2 to atotallymadeupnamefor4 for target.example.net." unbound.log; then
80 echo "> dig cname.example.net. AAAA"
81 dig @127.0.0.1 -p $UNBOUND_PORT cname.example.net. AAAA | tee outfile
83 if grep "::2" outfile; then
93 if grep "ipset: add ::2 to atotallymadeupnamefor6 for target.example.net." unbound.log; then
103 echo "> dig outsidecname.example.net."
104 dig @127.0.0.1 -p $UNBOUND_PORT outsidecname.example.net. | tee outfile
105 echo "> check answer"
106 if grep "3.3.3.3" outfile; then
109 echo "> cat logfiles"
116 if grep "ipset: add 3.3.3.3 to atotallymadeupnamefor4 for target.example.com." unbound.log; then
119 echo "> cat logfiles"
126 echo "> dig outsidecname.example.net. AAAA"
127 dig @127.0.0.1 -p $UNBOUND_PORT outsidecname.example.net. AAAA | tee outfile
128 echo "> check answer"
129 if grep "::3" outfile; then
132 echo "> cat logfiles"
139 if grep "ipset: add ::3 to atotallymadeupnamefor6 for target.example.com." unbound.log; then
142 echo "> cat logfiles"
149 echo "> dig lookslikeexample.net. AAAA"
150 dig @127.0.0.1 -p $UNBOUND_PORT lookslikeexample.net. AAAA | tee outfile
151 echo "> check answer"
152 if grep "::4" outfile; then
155 echo "> cat logfiles"
162 if grep "ipset: add ::4 to atotallymadeupnamefor6 for lookslikeexample.net." unbound.log; then
163 echo "> cat logfiles"
172 echo "> cat logfiles"