mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-10-12 01:26:48 +08:00
tests: openconnect binary is now set in variable
This commit is contained in:
@@ -31,7 +31,7 @@ launch_server -d 1 -f -c ${srcdir}/test-multi-cookie.config & PID=$!
|
||||
wait_server $PID
|
||||
|
||||
echo "Connecting to obtain cookie... "
|
||||
eval `echo "test" | openconnect -q localhost:$PORT -u test --authenticate --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3`
|
||||
eval `echo "test" | $OPENCONNECT -q localhost:$PORT -u test --authenticate --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3`
|
||||
|
||||
if [ -z "$COOKIE" ];then
|
||||
fail $PID "Could not obtain cookie"
|
||||
@@ -40,15 +40,15 @@ fi
|
||||
#echo "Cookie: $COOKIE"
|
||||
|
||||
echo "Connecting with cookie... "
|
||||
echo "test" | openconnect -q localhost:$PORT -u test -C "$COOKIE" --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 --script=/bin/true --verbose --pid-file ${srcdir}/pid1.$$ &
|
||||
echo "test" | $OPENCONNECT -q localhost:$PORT -u test -C "$COOKIE" --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 --script=/bin/true --verbose --pid-file ${srcdir}/pid1.$$ &
|
||||
CPID=$!
|
||||
|
||||
sleep 4
|
||||
|
||||
echo "Connecting again with same cookie... "
|
||||
#( echo "test" | openconnect -q localhost:$PORT -u test -C "$COOKIE" --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 --cookieonly >/dev/null 2>&1 ) ||
|
||||
#( echo "test" | $OPENCONNECT -q localhost:$PORT -u test -C "$COOKIE" --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 --cookieonly >/dev/null 2>&1 ) ||
|
||||
# fail $PID "Could not connect to server"
|
||||
echo "test" | openconnect -q localhost:$PORT -b -u test -C "$COOKIE" --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 --script=/bin/true --verbose --pid-file ${srcdir}/pid2.$$ &
|
||||
echo "test" | $OPENCONNECT -q localhost:$PORT -b -u test -C "$COOKIE" --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 --script=/bin/true --verbose --pid-file ${srcdir}/pid2.$$ &
|
||||
C2PID=$!
|
||||
|
||||
sleep 4
|
||||
|
||||
Reference in New Issue
Block a user