tests: use openconnect -b in full-test

This commit is contained in:
Nikos Mavrogiannopoulos
2015-05-22 15:15:30 +02:00
parent 96cf2ca674
commit f7c9079e82

View File

@@ -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