mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 08:46:58 +08:00
simplified and corrected test execution
This commit is contained in:
@@ -41,8 +41,6 @@ fail() {
|
||||
}
|
||||
|
||||
launch_server() {
|
||||
PARENT=$1;
|
||||
shift;
|
||||
$SERV $* >/dev/null 2>&1 &
|
||||
LOCALPID="$!";
|
||||
trap "[ ! -z \"${LOCALPID}\" ] && kill ${LOCALPID};" 15
|
||||
@@ -50,8 +48,6 @@ launch_server() {
|
||||
LOCALRET="$?"
|
||||
if [ "${LOCALRET}" != "0" ] && [ "${LOCALRET}" != "143" ] ; then
|
||||
# Houston, we'v got a problem...
|
||||
echo "Failed to launch the server !"
|
||||
test -z "${PARENT}" || kill -10 ${PARENT}
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
@@ -64,8 +60,6 @@ launch_debug_server() {
|
||||
LOCALRET="$?"
|
||||
if [ "${LOCALRET}" != "0" ] && [ "${LOCALRET}" != "143" ] ; then
|
||||
# Houston, we'v got a problem...
|
||||
echo "Failed to launch the server !"
|
||||
test -z "${PARENT}" || kill -10 ${PARENT}
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ PORT=4446
|
||||
|
||||
echo "Testing ocserv with certificates... "
|
||||
|
||||
launch_server -d -f -c test3.config & PID=$!
|
||||
launch_server -d 1 -f -c test3.config & PID=$!
|
||||
wait_server $PID
|
||||
|
||||
echo -n "Connecting to obtain cookie (without certificate)... "
|
||||
|
||||
@@ -28,7 +28,7 @@ echo "Testing ocserv and user route application... "
|
||||
|
||||
rm -f ${srcdir}/test-iroute.tmp
|
||||
|
||||
launch_server -d -f -c ${srcdir}/test-iroute.config & PID=$!
|
||||
launch_server -d 1 -f -c ${srcdir}/test-iroute.config & PID=$!
|
||||
wait_server $PID
|
||||
|
||||
echo -n "Connecting to obtain cookie (with certificate)... "
|
||||
|
||||
@@ -27,7 +27,7 @@ PORT=4500
|
||||
echo "Testing whether cookies are being re-used... "
|
||||
rm -f ${srcdir}/pid1 ${srcdir}/pid2
|
||||
|
||||
launch_server -d -f -c ${srcdir}/test-multi-cookie.config & PID=$!
|
||||
launch_server -d 1 -f -c ${srcdir}/test-multi-cookie.config & PID=$!
|
||||
wait_server $PID
|
||||
|
||||
echo "Connecting to obtain cookie... "
|
||||
|
||||
@@ -26,7 +26,7 @@ PORT=4444
|
||||
|
||||
echo "Testing PAM backend with username-password... "
|
||||
|
||||
launch_server -d -f -c test-pam.config & PID=$!
|
||||
launch_server -d 1 -f -c test-pam.config & PID=$!
|
||||
wait_server $PID
|
||||
|
||||
echo "Connecting to obtain cookie... "
|
||||
|
||||
@@ -26,7 +26,7 @@ PORT=4444
|
||||
|
||||
echo "Testing local backend with username-password... "
|
||||
|
||||
launch_server -d -f -c test1.config & PID=$!
|
||||
launch_server -d 1 -f -c test1.config & PID=$!
|
||||
wait_server $PID
|
||||
|
||||
echo "Connecting to obtain cookie... "
|
||||
|
||||
@@ -26,7 +26,7 @@ PORT=4445
|
||||
|
||||
echo "Testing local backend with username-password and certificate... "
|
||||
|
||||
launch_server -d -f -c test-user-cert.config & PID=$!
|
||||
launch_server -d 1 -f -c test-user-cert.config & PID=$!
|
||||
wait_server $PID
|
||||
|
||||
echo -n "Connecting to obtain cookie (without certificate)... "
|
||||
|
||||
@@ -26,7 +26,7 @@ PORT=4448
|
||||
|
||||
echo "Testing local backend with username-password... "
|
||||
|
||||
launch_server -d -f -c test-pass-script.config & PID=$!
|
||||
launch_server -d 1 -f -c test-pass-script.config & PID=$!
|
||||
wait_server $PID
|
||||
|
||||
echo "Connecting to obtain cookie with wrong username... "
|
||||
|
||||
Reference in New Issue
Block a user