mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 08:46:58 +08:00
tests: moved config files to data/
This commit is contained in:
@@ -1,22 +1,22 @@
|
||||
include ../src/common.mk
|
||||
|
||||
EXTRA_DIST = certs/ca-key.pem certs/ca.pem common.sh certs/server-cert.pem \
|
||||
certs/server-key.pem test1.config \
|
||||
test1.passwd test-user-cert.config certs/user-cert.pem certs/user-key.pem \
|
||||
test3.config test-iroute.config \
|
||||
user-config/test user-config-opt/test test-pass-script.config test-multi-cookie.config \
|
||||
test-stress.config certs/user-cert-wrong.pem connect-script test-group.passwd \
|
||||
test-group-pass.config certs/user-group-cert.pem certs/user-group-key.pem \
|
||||
test-user-group-cert.config \
|
||||
test-user-group-cert-no-pass.config docker-common.sh test-cookie-timeout.config \
|
||||
test-cookie-timeout-2.config user-config-explicit/test test-explicit-ip.config \
|
||||
certs/server-key.pem data/test1.config \
|
||||
test1.passwd data/test-user-cert.config certs/user-cert.pem certs/user-key.pem \
|
||||
data/test3.config data/test-iroute.config \
|
||||
user-config/test user-config-opt/test data/test-pass-script.config data/test-multi-cookie.config \
|
||||
data/test-stress.config certs/user-cert-wrong.pem connect-script test-group.passwd \
|
||||
data/test-group-pass.config certs/user-group-cert.pem certs/user-group-key.pem \
|
||||
data/test-user-group-cert.config \
|
||||
data/test-user-group-cert-no-pass.config docker-common.sh data/test-cookie-timeout.config \
|
||||
data/test-cookie-timeout-2.config user-config-explicit/test data/test-explicit-ip.config \
|
||||
test-explicit-ip user-config-explicit/test2 user-config-explicit/test3 \
|
||||
user-config-explicit/test4 test-pass-opt-cert.config test-gssapi.config \
|
||||
test-ban.config test-sighup.config test-gssapi-local-map.config \
|
||||
test-cookie-invalidation.config test-enc-key2.config test-enc-key.config \
|
||||
user-config-explicit/test4 data/test-pass-opt-cert.config data/test-gssapi.config \
|
||||
data/test-ban.config data/test-sighup.config data/test-gssapi-local-map.config \
|
||||
data/test-cookie-invalidation.config data/test-enc-key2.config data/test-enc-key.config \
|
||||
certs/server-key-ossl.pem certs/server-key-p8.pem proxyproto-unix-test certs/user-cn.pem \
|
||||
certs/user-cert-testuser.pem test-stress test-user-config.config user-config/testuser \
|
||||
test-sighup-key-change.config test-sighup-key-change.config user-config/testipnet \
|
||||
certs/user-cert-testuser.pem test-stress data/test-user-config.config user-config/testuser \
|
||||
data/test-sighup-key-change.config data/test-sighup-key-change.config user-config/testipnet \
|
||||
certs/user-cert-testipnet.pem certs/user-cert-invalid.pem certs/server-cert-ca.pem
|
||||
|
||||
SUBDIRS = docker-ocserv docker-kerberos
|
||||
|
||||
@@ -31,7 +31,7 @@ if test -z "$NO_NEED_ROOT";then
|
||||
exit 77
|
||||
fi
|
||||
else
|
||||
SOCKDIR=${srcdir}/sockwrap.$$.tmp
|
||||
SOCKDIR="${srcdir}/tmp/sockwrap.$$.tmp"
|
||||
mkdir -p $SOCKDIR
|
||||
export SOCKET_WRAPPER_DIR=$SOCKDIR
|
||||
export SOCKET_WRAPPER_DEFAULT_IFACE=2
|
||||
@@ -48,7 +48,7 @@ update_config() {
|
||||
file=$1
|
||||
username=$(whoami)
|
||||
group=$(groups|cut -f 1 -d ' ')
|
||||
cp ${srcdir}/${file} "$file.tmp"
|
||||
cp "${srcdir}/data/${file}" "$file.tmp"
|
||||
sed -i 's|@USERNAME@|'${username}'|g' "$file.tmp"
|
||||
sed -i 's|@GROUP@|'${group}'|g' "$file.tmp"
|
||||
sed -i 's|@SRCDIR@|'${srcdir}'|g' "$file.tmp"
|
||||
|
||||
@@ -33,7 +33,7 @@ TMPFILE1=${srcdir}/test-append-routes.tmp
|
||||
|
||||
rm -f ${TMPFILE1}
|
||||
|
||||
cp ${srcdir}/test-user-config.config ${CONFFILE}
|
||||
cp ${srcdir}/data/test-user-config.config ${CONFFILE}
|
||||
echo "append-routes = true" >> ${CONFFILE}
|
||||
sed -i 's/= 4512/= 4612/g' ${CONFFILE}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ PORT=4497
|
||||
|
||||
echo "Testing whether ban operates as expected... "
|
||||
|
||||
launch_server -d 1 -f -c ${srcdir}/test-ban.config & PID=$!
|
||||
launch_server -d 1 -f -c ${srcdir}/data/test-ban.config & PID=$!
|
||||
wait_server $PID
|
||||
|
||||
echo "Connecting with wrong password 5 times... "
|
||||
|
||||
@@ -29,7 +29,7 @@ PIDFILE2="${srcdir}/ci$$-2.pid"
|
||||
echo "Testing whether cookies are being correctly invalidated... "
|
||||
rm -f "${PIDFILE1}" "${PIDFILE2}"
|
||||
|
||||
launch_server -d 1 -f -c ${srcdir}/test-cookie-invalidation.config & PID=$!
|
||||
launch_server -d 1 -f -c ${srcdir}/data/test-cookie-invalidation.config & PID=$!
|
||||
wait_server $PID
|
||||
|
||||
echo "Connecting to obtain cookie... "
|
||||
|
||||
@@ -28,7 +28,7 @@ echo "Testing whether cookies will expire as expected... "
|
||||
|
||||
PIDFILE="${srcdir}/ct$$.pid"
|
||||
|
||||
launch_server -d 1 -f -c ${srcdir}/test-cookie-timeout.config & PID=$!
|
||||
launch_server -d 1 -f -c ${srcdir}/data/test-cookie-timeout.config & PID=$!
|
||||
wait_server $PID
|
||||
|
||||
echo "Connecting to obtain cookie... "
|
||||
|
||||
@@ -27,7 +27,7 @@ PORT=4498
|
||||
echo "Testing whether cookies will remain valid during the session time... "
|
||||
rm -f ${srcdir}/pid.$$
|
||||
|
||||
launch_server -d 1 -f -c ${srcdir}/test-cookie-timeout-2.config & PID=$!
|
||||
launch_server -d 1 -f -c ${srcdir}/data/test-cookie-timeout-2.config & PID=$!
|
||||
wait_server $PID
|
||||
|
||||
echo "Connecting to obtain cookie... "
|
||||
|
||||
@@ -54,7 +54,7 @@ return 0
|
||||
|
||||
echo "Testing local backend with username-password and explicit IP addresses... "
|
||||
|
||||
launch_server -d 1 -f -c test-explicit-ip.config & PID=$!
|
||||
launch_server -d 1 -f -c "${srcdir}/data/test-explicit-ip.config" & PID=$!
|
||||
wait_server $PID
|
||||
|
||||
echo -n "Connecting with an illegal address assigned... "
|
||||
|
||||
@@ -27,7 +27,7 @@ PORT=6550
|
||||
|
||||
echo "Testing local backend with certificate... "
|
||||
|
||||
launch_sr_server -d 1 -f -c test-group-cert.config & PID=$!
|
||||
launch_sr_server -d 1 -f -c data/test-group-cert.config & PID=$!
|
||||
wait_server $PID
|
||||
|
||||
echo -n "Connecting to obtain cookie (without certificate)... "
|
||||
|
||||
@@ -40,7 +40,7 @@ export NTLM_USER_FILE=$srcdir/ntlm.pass
|
||||
echo "TEST:test:testpass" >$NTLM_USER_FILE
|
||||
echo "TEST:test:wrongpass" >$NTLM_USER_FILE.wrong
|
||||
|
||||
launch_server -d 1 -f -c test-gssapi.config & PID=$!
|
||||
launch_server -d 1 -f -c data/test-gssapi.config & PID=$!
|
||||
wait_server $PID
|
||||
|
||||
echo "Connecting with curl... "
|
||||
@@ -60,7 +60,7 @@ echo "Testing local backend with gssapi and local-map on... "
|
||||
sleep 2
|
||||
|
||||
# Test whether no-local-map is by default true
|
||||
launch_server -d 1 -f -c test-gssapi-local-map.config & PID=$!
|
||||
launch_server -d 1 -f -c data/test-gssapi-local-map.config & PID=$!
|
||||
wait_server $PID
|
||||
|
||||
echo "Connecting with curl... "
|
||||
|
||||
@@ -28,7 +28,7 @@ echo "Testing ocserv and user route application... "
|
||||
|
||||
rm -f ${srcdir}/test-iroute.tmp
|
||||
|
||||
launch_server -d 1 -f -c ${srcdir}/test-iroute.config & PID=$!
|
||||
launch_server -d 1 -f -c "${srcdir}/data/test-iroute.config" & PID=$!
|
||||
wait_server $PID
|
||||
|
||||
echo -n "Connecting to obtain cookie (with certificate)... "
|
||||
|
||||
@@ -30,7 +30,7 @@ PIDFILE1="${srcdir}/ci$$-1.pid"
|
||||
PIDFILE2="${srcdir}/ci$$-2.pid"
|
||||
rm -f "${PIDFILE1}" "${PIDFILE2}"
|
||||
|
||||
launch_server -d 1 -f -c ${srcdir}/test-multi-cookie.config & PID=$!
|
||||
launch_server -d 1 -f -c "${srcdir}/data/test-multi-cookie.config" & PID=$!
|
||||
wait_server $PID
|
||||
|
||||
echo "Connecting to obtain cookie... "
|
||||
|
||||
@@ -53,7 +53,7 @@ return 0
|
||||
|
||||
echo "Testing local backend with username-password and optional certificate... "
|
||||
|
||||
launch_server -d 1 -f -c test-pass-opt-cert.config & PID=$!
|
||||
launch_server -d 1 -f -c "${srcdir}/data/test-pass-opt-cert.config" & PID=$!
|
||||
wait_server $PID
|
||||
|
||||
echo -n "Connecting to obtain cookie (user without certificate)... "
|
||||
|
||||
@@ -30,7 +30,7 @@ rm -f ${builddir}/disconnect.ok
|
||||
|
||||
echo "Testing local backend with username-password... "
|
||||
|
||||
launch_server -d 1 -f -c test-pass-script.config & PID=$!
|
||||
launch_server -d 1 -f -c "${srcdir}/data/test-pass-script.config" & PID=$!
|
||||
wait_server $PID
|
||||
|
||||
echo "Connecting to obtain cookie with wrong username... "
|
||||
|
||||
@@ -39,7 +39,7 @@ run_client() {
|
||||
|
||||
echo "Testing local backend with username-password... "
|
||||
|
||||
launch_debug_server -f -c test-stress.config & PID=$!
|
||||
launch_debug_server -f -c "${srcdir}/data/test-stress.config" & PID=$!
|
||||
wait_server $PID
|
||||
|
||||
sleep 3
|
||||
|
||||
@@ -35,7 +35,7 @@ TMPFILE2=${srcdir}/test-user-config-2.tmp
|
||||
rm -f ${TMPFILE1}
|
||||
rm -f ${TMPFILE2}
|
||||
|
||||
launch_simple_server -d 1 -f -c ${srcdir}/test-user-config.config
|
||||
launch_simple_server -d 1 -f -c "${srcdir}/data/test-user-config.config"
|
||||
PID=$!
|
||||
wait_server $PID
|
||||
|
||||
|
||||
Reference in New Issue
Block a user