mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 00:37:00 +08:00
tests: use the --pid-file and -p options in ocserv
This allows detecting issues like in #143 where these two options regressed. Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
This commit is contained in:
@@ -22,13 +22,14 @@ SERV="${SERV:-../src/ocserv}"
|
||||
srcdir=${srcdir:-.}
|
||||
NO_NEED_ROOT=1
|
||||
PORT=4444
|
||||
PIDFILE=ocserv-pid.$$.tmp
|
||||
|
||||
. `dirname $0`/common.sh
|
||||
|
||||
echo "Testing local backend with username-password... "
|
||||
|
||||
update_config test1.config
|
||||
launch_sr_server -d 1 -f -c ${CONFIG} & PID=$!
|
||||
launch_sr_server -d 1 -p ${PIDFILE} -f -c ${CONFIG} & PID=$!
|
||||
wait_server $PID
|
||||
|
||||
echo "Connecting to obtain cookie... "
|
||||
@@ -63,6 +64,10 @@ echo "Connecting to obtain cookie with empty password... "
|
||||
#( echo "test" | LD_PRELOAD=libsocket_wrapper.so $OPENCONNECT -q $ADDRESS:$PORT -u test --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 --script=/bin/true ) ||
|
||||
# fail $PID "Could not connect to server"
|
||||
|
||||
if ! test -f ${PIDFILE};then
|
||||
fail $PID "Could not find pid file ${PIDFILE}"
|
||||
fi
|
||||
|
||||
cleanup
|
||||
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user