tests: kill politely openconnect in all docker tests

This commit is contained in:
Nikos Mavrogiannopoulos
2015-12-07 14:40:36 +01:00
parent 4fad865864
commit 9979b8cde0
6 changed files with 28 additions and 28 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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