summaryrefslogtreecommitdiff
path: root/testdata/10-unbound-anchor.tdir/10-unbound-anchor.pre
diff options
context:
space:
mode:
Diffstat (limited to 'testdata/10-unbound-anchor.tdir/10-unbound-anchor.pre')
-rw-r--r--testdata/10-unbound-anchor.tdir/10-unbound-anchor.pre33
1 files changed, 33 insertions, 0 deletions
diff --git a/testdata/10-unbound-anchor.tdir/10-unbound-anchor.pre b/testdata/10-unbound-anchor.tdir/10-unbound-anchor.pre
new file mode 100644
index 0000000000000..acf223277514d
--- /dev/null
+++ b/testdata/10-unbound-anchor.tdir/10-unbound-anchor.pre
@@ -0,0 +1,33 @@
+# #-- 10-unbound-anchor.pre--#
+# source the master var file when it's there
+[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
+# use .tpkg.var.test for in test variable passing
+[ -f .tpkg.var.test ] && source .tpkg.var.test
+
+. ../common.sh
+PRE="../.."
+get_random_port 2
+PETAL_PORT=$RND_PORT
+FWD_PORT=$(($RND_PORT + 1))
+echo "PETAL_PORT=$PETAL_PORT" >> .tpkg.var.test
+echo "FWD_PORT=$FWD_PORT" >> .tpkg.var.test
+
+get_make
+(cd $PRE; $MAKE petal)
+
+# start forwarder
+get_ldns_testns
+$LDNS_TESTNS -p $FWD_PORT 10-unbound-anchor.testns >fwd.log 2>&1 &
+FWD_PID=$!
+echo "FWD_PID=$FWD_PID" >> .tpkg.var.test
+
+# start https daemon
+$PRE/petal -v -a "127.0.0.1" -p $PETAL_PORT >petal.log 2>&1 &
+PETAL_PID=$!
+echo "PETAL_PID=$PETAL_PID" >> .tpkg.var.test
+cat .tpkg.var.test
+sed -e "s/@TOPORT@/$FWD_PORT/" < 10-unbound-anchor.conf > ub.conf
+
+wait_ldns_testns_up fwd.log
+wait_petal_up petal.log
+