tests: improved tests with cookies

They use the --background openconnect option instead of the shell
background command.
This commit is contained in:
Nikos Mavrogiannopoulos
2015-04-21 16:18:36 +02:00
parent c6c9ca9a2c
commit 8e5e00a40d
3 changed files with 8 additions and 13 deletions

View File

@@ -41,7 +41,7 @@ fi
sleep 10
echo ""
echo "Connecting with cookie... "
echo "test" | $OPENCONNECT -q -b localhost:$PORT -u test -C "$COOKIE" --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 --script=/bin/true --verbose --pid-file ${srcdir}/pid.$$ &
echo "test" | $OPENCONNECT -q -b localhost:$PORT -u test -C "$COOKIE" --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 --script=/bin/true --verbose --pid-file ${srcdir}/pid.$$ --background
sleep 4
@@ -56,7 +56,7 @@ rm -f "${srcdir}/pid2.$$"
sleep 30
echo ""
echo "Connecting again with cookie (overriding first session)... "
echo "test" | $OPENCONNECT -b -q localhost:$PORT -u test -C "$COOKIE" --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 --script=/bin/true --verbose --pid-file ${srcdir}/pid2.$$ &
echo "test" | $OPENCONNECT -b -q localhost:$PORT -u test -C "$COOKIE" --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 --script=/bin/true --verbose --pid-file ${srcdir}/pid2.$$ --background
sleep 6
@@ -67,7 +67,6 @@ else
CPID=`cat ${srcdir}/pid2.$$`
kill $CPID
rm -f "${srcdir}/pid2.$$"
wait $CPID
fi
kill $PID