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