Debian Codegraph @

testdata/stub_udp_with_tcp_upstream.tdir/stub_udp_with_tcp_upstream.test

raw
1 # #-- stub_udp_with_tcp_upstream.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 PRE="../.."
8 # do the test
9 echo "> dig tcp.example.com."
10 dig @127.0.0.1 -p $UNBOUND_PORT tcp.example.com. | tee outfile
11 echo "> cat logfiles"
12 cat fwd.log
13 cat unbound.log
14 echo "> check answer"
15 if grep "10.20.30.40" outfile; then
16 echo "OK"
17 else
18 echo "Not OK"
19 exit 1
20 fi
21
22
23 # check if second stub is requested via udp
24 echo "> dig udp.example.com."
25 dig @127.0.0.1 -p $UNBOUND_PORT udp.example.com. | tee outfile
26 echo "> cat logfiles"
27 cat fwd.log
28 cat unbound.log
29 echo "> check answer"
30 if grep "10.20.30.80" outfile; then
31 echo "OK"
32 else
33 echo "Not OK"
34 exit 1
35 fi
36
37 exit 0