summaryrefslogtreecommitdiff
path: root/testdata/auth_https.tdir/auth_https.pre
diff options
context:
space:
mode:
Diffstat (limited to 'testdata/auth_https.tdir/auth_https.pre')
-rw-r--r--testdata/auth_https.tdir/auth_https.pre34
1 files changed, 34 insertions, 0 deletions
diff --git a/testdata/auth_https.tdir/auth_https.pre b/testdata/auth_https.tdir/auth_https.pre
new file mode 100644
index 000000000000..e50fd5faa32d
--- /dev/null
+++ b/testdata/auth_https.tdir/auth_https.pre
@@ -0,0 +1,34 @@
+# #-- auth_https.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
+
+PRE="../.."
+. ../common.sh
+get_random_port 2
+UNBOUND_PORT=$RND_PORT
+PETAL_PORT=$(($RND_PORT + 1))
+echo "UNBOUND_PORT=$UNBOUND_PORT" >> .tpkg.var.test
+echo "PETAL_PORT=$PETAL_PORT" >> .tpkg.var.test
+
+get_make
+(cd $PRE; $MAKE petal)
+
+# 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
+wait_petal_up petal.log
+
+# make config file
+sed -e 's/@PORT\@/'$UNBOUND_PORT'/' -e 's/@TOPORT\@/'$PETAL_PORT'/' < auth_https.conf > ub.conf
+# start unbound in the background
+$PRE/unbound -d -c ub.conf >unbound.log 2>&1 &
+UNBOUND_PID=$!
+echo "UNBOUND_PID=$UNBOUND_PID" >> .tpkg.var.test
+
+cat .tpkg.var.test
+wait_unbound_up unbound.log
+