store temp files in a fixed dir

This commit is contained in:
Nikos Mavrogiannopoulos
2013-12-08 13:07:10 +01:00
parent c256f14c33
commit 32bfe5f6ae
2 changed files with 7 additions and 4 deletions

View File

@@ -7,3 +7,6 @@ dist_check_SCRIPTS = test-pass test-pass-cert test-cert test-iroute test-pass-sc
TESTS = test-pass test-pass-cert test-cert test-iroute test-pass-script \
test-multi-cookie
TESTS_ENVIRONMENT = srcdir="$(srcdir)" \
top_builddir="$(top_builddir)"

View File

@@ -29,25 +29,25 @@ launch_server -d -f -c test-iroute.config & PID=$!
wait_server $PID
echo -n "Connecting to obtain cookie (with certificate)... "
( openconnect -q localhost:$PORT --sslkey ./user-key.pem -c ./user-cert.pem --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 --cookieonly </dev/null >/dev/null 2>&1 ) ||
( openconnect -q localhost:$PORT --sslkey ${srcdir}/user-key.pem -c ${srcdir}/user-cert.pem --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 --cookieonly </dev/null >/dev/null 2>&1 ) ||
fail $PID "Could not connect with certificate!"
echo ok
echo -n "Checking if routes have been applied... "
if [ ! -f test-iroute.tmp ];then
if [ ! -f ${srcdir}/test-iroute.tmp ];then
fail $PID "Temporary file cannot be found"
fi
CONTENTS=`cat ./test-iroute.tmp`
CONTENTS=`cat ${srcdir}/test-iroute.tmp`
if [[ "$CONTENTS" =~ "192.168.1.0/24 [vpns|tun]$" ]];then
fail $PID "Temporary file contents are not correct"
fi
echo ok
rm -f test-iroute.tmp
rm -f ${srcdir}/test-iroute.tmp
kill $PID
wait