mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 08:46:58 +08:00
tests: improved tests with cookies
They use the --background openconnect option instead of the shell background command.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user