Debian Codegraph @

testdata/fwd_udp_with_tcp_upstream.tdir/fwd_udp_with_tcp_upstream.test

raw
1 # #-- fwd_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 echo "> dig udp.example.com."
23 dig @127.0.0.1 -p $UNBOUND_PORT udp.example.com. | tee outfile
24 echo "> cat logfiles"
25 cat fwd.log
26 cat unbound.log
27 echo "> check answer"
28 if grep "10.20.30.80" outfile; then
29 echo "OK"
30 else
31 echo "Not OK"
32 exit 1
33 fi
34
35 exit 0