mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-10-12 01:26:48 +08:00
tests: use openconnect -b in full-test
This commit is contained in:
+12
-3
@@ -71,13 +71,22 @@ fi
|
|||||||
echo ""
|
echo ""
|
||||||
echo "Connecting with correct username"
|
echo "Connecting with correct username"
|
||||||
$ECHO_E "test" >pass-full$TMP
|
$ECHO_E "test" >pass-full$TMP
|
||||||
$OPENCONNECT $IP:$PORT_OCSERV -u test --passwd-on-stdin -v --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 < pass-full$TMP &
|
$OPENCONNECT $IP:$PORT_OCSERV -b --pid-file ${srcdir}/pid1.$$ -u test --passwd-on-stdin -v --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 < pass-full$TMP
|
||||||
PID=$!
|
if test $? != 0;then
|
||||||
|
echo "Cannot connect to server"
|
||||||
|
stop
|
||||||
|
fi
|
||||||
|
|
||||||
#wait for openconnect
|
#wait for openconnect
|
||||||
sleep 5
|
sleep 5
|
||||||
|
|
||||||
rm -f pass-full$TMP
|
rm -f pass-full$TMP
|
||||||
|
if [ ! -f ${srcdir}/pid1.$$ ];then
|
||||||
|
echo "It was not possible to establish session!"
|
||||||
|
stop
|
||||||
|
fi
|
||||||
|
|
||||||
|
PID=`cat ${srcdir}/pid1.$$`
|
||||||
|
|
||||||
# The client IP depends on the username so it shouldn't change.
|
# The client IP depends on the username so it shouldn't change.
|
||||||
ping -w 5 192.168.1.1
|
ping -w 5 192.168.1.1
|
||||||
|
|||||||
Reference in New Issue
Block a user