mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 00:37:00 +08:00
tests: kill politely openconnect in all docker tests
This commit is contained in:
@@ -88,13 +88,13 @@ rm -f pass-${TMP}.tmp
|
||||
# The client IP depends on the username so it shouldn't change.
|
||||
ping -w 5 192.168.237.1
|
||||
if test $? != 0;then
|
||||
kill $PID
|
||||
kill -INT $PID
|
||||
echo "Cannot ping ocserv"
|
||||
stop
|
||||
fi
|
||||
|
||||
retrieve_user_info test
|
||||
kill $PID
|
||||
kill -INT $PID
|
||||
|
||||
$DOCKER stop $IMAGE_NAME
|
||||
$DOCKER rm $IMAGE_NAME
|
||||
|
||||
@@ -80,14 +80,14 @@ rm -f $TMP
|
||||
# The client IP depends on the username so it shouldn't change.
|
||||
ping -w 5 192.168.76.1
|
||||
if test $? != 0;then
|
||||
kill $PID
|
||||
kill -INT $PID
|
||||
echo "Cannot ping ocserv"
|
||||
stop
|
||||
fi
|
||||
|
||||
ping -w 5 192.168.76.1 -s 1500
|
||||
if test $? != 0;then
|
||||
kill $PID
|
||||
kill -INT $PID
|
||||
echo "Cannot ping ocserv"
|
||||
stop
|
||||
fi
|
||||
@@ -99,14 +99,14 @@ retrieve_user_info test
|
||||
if test "$FEDORA" = 1;then
|
||||
nuttcp -T 10 -t 192.168.76.1
|
||||
if test $? != 0;then
|
||||
kill $PID
|
||||
kill -INT $PID
|
||||
echo "Cannot send to ocserv"
|
||||
stop
|
||||
fi
|
||||
|
||||
nuttcp -T 10 -r 192.168.76.1
|
||||
if test $? != 0;then
|
||||
kill $PID
|
||||
kill -INT $PID
|
||||
echo "Cannot recv from ocserv"
|
||||
stop
|
||||
fi
|
||||
@@ -114,7 +114,7 @@ fi
|
||||
|
||||
sleep 2
|
||||
|
||||
kill $PID
|
||||
kill -INT $PID
|
||||
|
||||
sleep 4
|
||||
|
||||
|
||||
@@ -98,14 +98,14 @@ rm -f pass-pam.tmp
|
||||
# The client IP depends on the username so it shouldn't change.
|
||||
ping -w 5 192.168.56.1
|
||||
if test $? != 0;then
|
||||
kill $PID
|
||||
kill -INT $PID
|
||||
echo "Cannot ping ocserv"
|
||||
stop
|
||||
fi
|
||||
|
||||
ping -w 5 192.168.56.1 -s 1500
|
||||
if test $? != 0;then
|
||||
kill $PID
|
||||
kill -INT $PID
|
||||
echo "Cannot ping ocserv"
|
||||
stop
|
||||
fi
|
||||
@@ -117,14 +117,14 @@ retrieve_user_info testuser
|
||||
if test "$FEDORA" = 1;then
|
||||
nuttcp -T 10 -t 192.168.56.1
|
||||
if test $? != 0;then
|
||||
kill $PID
|
||||
kill -INT $PID
|
||||
echo "Cannot send to ocserv"
|
||||
stop
|
||||
fi
|
||||
|
||||
nuttcp -T 10 -r 192.168.56.1
|
||||
if test $? != 0;then
|
||||
kill $PID
|
||||
kill -INT $PID
|
||||
echo "Cannot recv from ocserv"
|
||||
stop
|
||||
fi
|
||||
@@ -132,7 +132,7 @@ fi
|
||||
|
||||
sleep 2
|
||||
|
||||
kill $PID
|
||||
kill -INT $PID
|
||||
|
||||
sleep 4
|
||||
|
||||
|
||||
@@ -79,14 +79,14 @@ rm -f $PIDFILE
|
||||
# The client IP depends on the username so it shouldn't change.
|
||||
ping -w 5 192.168.196.1
|
||||
if test $? != 0;then
|
||||
kill $PID
|
||||
kill -INT $PID
|
||||
echo "Cannot ping ocserv"
|
||||
stop
|
||||
fi
|
||||
|
||||
ping -w 5 192.168.196.1 -s 1500
|
||||
if test $? != 0;then
|
||||
kill $PID
|
||||
kill -INT $PID
|
||||
echo "Cannot ping ocserv"
|
||||
stop
|
||||
fi
|
||||
@@ -99,23 +99,23 @@ if test "$FEDORA" = 1;then
|
||||
nuttcp -T 10 -t 192.168.196.1
|
||||
if test $? != 0;then
|
||||
echo "Cannot send to ocserv"
|
||||
kill -INT $PID
|
||||
exit 77
|
||||
kill $PID
|
||||
stop
|
||||
fi
|
||||
|
||||
nuttcp -T 10 -r 192.168.196.1
|
||||
if test $? != 0;then
|
||||
echo "Cannot recv from ocserv"
|
||||
kill -INT $PID
|
||||
exit 77
|
||||
kill $PID
|
||||
stop
|
||||
fi
|
||||
fi
|
||||
|
||||
sleep 2
|
||||
|
||||
kill $PID
|
||||
kill -INT $PID
|
||||
|
||||
sleep 4
|
||||
|
||||
|
||||
@@ -83,21 +83,21 @@ rm -f pass-radius$TMP
|
||||
# The client IP depends on the username so it shouldn't change.
|
||||
ping -w 5 192.168.55.1
|
||||
if test $? != 0;then
|
||||
kill $PID
|
||||
kill -INT $PID
|
||||
echo "Cannot ping ocserv"
|
||||
stop
|
||||
fi
|
||||
|
||||
ping -w 5 192.168.55.1 -s 1500
|
||||
if test $? != 0;then
|
||||
kill $PID
|
||||
kill -INT $PID
|
||||
echo "Cannot ping ocserv"
|
||||
stop
|
||||
fi
|
||||
|
||||
ping6 -w 5 fc13:71:ea31:4b4e::1
|
||||
if test $? != 0;then
|
||||
kill $PID
|
||||
kill -INT $PID
|
||||
echo "Cannot ping the IPv6 of ocserv"
|
||||
stop
|
||||
fi
|
||||
@@ -109,14 +109,14 @@ retrieve_user_info test
|
||||
if test "$FEDORA" = 1;then
|
||||
nuttcp -T 10 -t 192.168.55.1
|
||||
if test $? != 0;then
|
||||
kill $PID
|
||||
kill -INT $PID
|
||||
echo "Cannot send to ocserv"
|
||||
stop
|
||||
fi
|
||||
|
||||
nuttcp -T 10 -r 192.168.55.1
|
||||
if test $? != 0;then
|
||||
kill $PID
|
||||
kill -INT $PID
|
||||
echo "Cannot recv from ocserv"
|
||||
stop
|
||||
fi
|
||||
@@ -180,7 +180,7 @@ fi
|
||||
|
||||
ping -w 5 192.168.55.1
|
||||
if test $? != 0;then
|
||||
kill $PID
|
||||
kill -INT $PID
|
||||
echo "Cannot ping ocserv"
|
||||
stop
|
||||
fi
|
||||
|
||||
@@ -65,14 +65,14 @@ rm -f pass$TMP
|
||||
# The client IP depends on the username so it shouldn't change.
|
||||
ping -w 5 192.168.99.1
|
||||
if test $? != 0;then
|
||||
kill $PID
|
||||
kill -INT $PID
|
||||
echo "Cannot ping ocserv"
|
||||
stop
|
||||
fi
|
||||
|
||||
ping -w 5 192.168.99.1 -s 1500
|
||||
if test $? != 0;then
|
||||
kill $PID
|
||||
kill -INT $PID
|
||||
echo "Cannot ping ocserv"
|
||||
stop
|
||||
fi
|
||||
@@ -84,20 +84,20 @@ retrieve_user_info test
|
||||
|
||||
#nuttcp -T 10 -t 192.168.99.1
|
||||
#if test $? != 0;then
|
||||
# kill $PID
|
||||
# kill -INT $PID
|
||||
# echo "Cannot send to ocserv"
|
||||
# stop
|
||||
#fi
|
||||
|
||||
#nuttcp -T 10 -r 192.168.99.1
|
||||
#if test $? != 0;then
|
||||
# kill $PID
|
||||
# kill -INT $PID
|
||||
# echo "Cannot recv from ocserv"
|
||||
# stop
|
||||
#fi
|
||||
sleep 2
|
||||
|
||||
kill $PID
|
||||
kill -INT $PID
|
||||
|
||||
sleep 4
|
||||
|
||||
|
||||
Reference in New Issue
Block a user