xref: /netbsd-src/external/bsd/unbound/dist/testdata/auth_https.tdir/auth_https.test (revision eceb233b9bd0dfebb902ed73b531ae6964fa3f9b)
1# #-- auth_https.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
7PRE="../.."
8# do the test
9echo "> dig www.example.com."
10dig @localhost -p $UNBOUND_PORT www.example.com. | tee outfile
11if grep SERVFAIL outfile; then
12	echo "> try again"
13	dig @localhost -p $UNBOUND_PORT www.example.com. | tee outfile
14fi
15if grep SERVFAIL outfile; then
16	echo "> try again"
17	sleep 1
18	dig @localhost -p $UNBOUND_PORT www.example.com. | tee outfile
19fi
20if grep SERVFAIL outfile; then
21	echo "> try again"
22	sleep 1
23	dig @localhost -p $UNBOUND_PORT www.example.com. | tee outfile
24fi
25if grep SERVFAIL outfile; then
26	echo "> try again"
27	sleep 1
28	dig @localhost -p $UNBOUND_PORT www.example.com. | tee outfile
29fi
30if grep SERVFAIL outfile; then
31	echo "> try again"
32	sleep 10
33	dig @localhost -p $UNBOUND_PORT www.example.com. | tee outfile
34fi
35if grep SERVFAIL outfile; then
36	echo "> try again"
37	sleep 10
38	dig @localhost -p $UNBOUND_PORT www.example.com. | tee outfile
39fi
40echo "> cat logfiles"
41cat petal.log
42cat unbound.log
43echo "> check answer"
44if grep "1.2.3.4" outfile; then
45	echo "OK"
46else
47	echo "Not OK"
48	exit 1
49fi
50
51exit 0
52