mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 08:46:58 +08:00
tests: use consistent name for PID file
This commit is contained in:
@@ -31,6 +31,7 @@ CONFIG="proxyproto"
|
||||
IMAGE=proxyproto-test
|
||||
IMAGE_NAME=test_proxyproto_ocserv
|
||||
TMP=$IMAGE_NAME.tmp
|
||||
PIDFILE="$IMAGE_NAME.$$.pid"
|
||||
. ./docker-common.sh
|
||||
|
||||
$DOCKER run -e OCCTL_PAGER=cat -P --privileged=true -p 22 --tty=false -d --name $IMAGE_NAME $IMAGE
|
||||
@@ -57,7 +58,7 @@ fi
|
||||
echo ""
|
||||
echo "Connecting with correct username"
|
||||
$ECHO_E "test" >pass-full$TMP
|
||||
$OPENCONNECT $IP:$PORT_OCSERV -b --pid-file ${srcdir}/pid1.$$ -u test --passwd-on-stdin -v --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 < pass-full$TMP
|
||||
$OPENCONNECT $IP:$PORT_OCSERV -b --pid-file $PIDFILE -u test --passwd-on-stdin -v --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 < pass-full$TMP
|
||||
if test $? != 0;then
|
||||
echo "Cannot connect to server"
|
||||
stop
|
||||
@@ -67,12 +68,13 @@ fi
|
||||
sleep 5
|
||||
|
||||
rm -f pass-full$TMP
|
||||
if [ ! -f ${srcdir}/pid1.$$ ];then
|
||||
if [ ! -f $PIDFILE ];then
|
||||
echo "It was not possible to establish session!"
|
||||
stop
|
||||
fi
|
||||
|
||||
PID=`cat ${srcdir}/pid1.$$`
|
||||
PID=`cat $PIDFILE`
|
||||
rm -f $PIDFILE
|
||||
|
||||
# The client IP depends on the username so it shouldn't change.
|
||||
ping -w 5 192.168.195.1
|
||||
|
||||
Reference in New Issue
Block a user