mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 16:57:00 +08:00
tests: use openconnect -b in full-test
This commit is contained in:
@@ -71,13 +71,22 @@ fi
|
||||
echo ""
|
||||
echo "Connecting with correct username"
|
||||
$ECHO_E "test" >pass-full$TMP
|
||||
$OPENCONNECT $IP:$PORT_OCSERV -u test --passwd-on-stdin -v --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 < pass-full$TMP &
|
||||
PID=$!
|
||||
|
||||
$OPENCONNECT $IP:$PORT_OCSERV -b --pid-file ${srcdir}/pid1.$$ -u test --passwd-on-stdin -v --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 < pass-full$TMP
|
||||
if test $? != 0;then
|
||||
echo "Cannot connect to server"
|
||||
stop
|
||||
fi
|
||||
|
||||
#wait for openconnect
|
||||
sleep 5
|
||||
|
||||
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.
|
||||
ping -w 5 192.168.1.1
|
||||
|
||||
Reference in New Issue
Block a user