added test for RX data

This commit is contained in:
Nikos Mavrogiannopoulos
2014-09-02 13:39:49 +02:00
parent ecd6e316a9
commit 9f42ae8da8
2 changed files with 22 additions and 3 deletions

View File

@@ -3,7 +3,7 @@ EXTRA_DIST = ca-key.pem ca.pem common.sh server-cert.pem server-key.pem test1.co
user-config/test test-pass-script.config test-multi-cookie.config test-pam.config \
test-stress.config user-cert-wrong.pem connect-script test-group.passwd \
test-group-pass.config user-group-cert.pem user-group-key.pem test-user-group-cert.config \
test-user-group-cert-no-pass.config
test-user-group-cert-no-pass.config echo-admin
SUBDIRS = docker-ocserv

View File

@@ -92,20 +92,39 @@ rm -f pass.tmp
sleep 5
# The client IP depends on the username so it shouldn't change.
ping -w 3 192.168.1.190
ping -w 5 192.168.1.190
if test $? != 0;then
kill $PID
echo "Cannot ping ocserv"
stop
fi
ping -w 3 192.168.1.190 -s 1500
ping -w 5 192.168.1.190 -s 1500
if test $? != 0;then
kill $PID
echo "Cannot ping ocserv"
stop
fi
export SSH_ASKPASS="$srcdir/echo-admin"
setsid ssh admin@192.168.1.190 occtl show user test >out.tmp 2>&1
grep "RX data" out.tmp
if test $? != 0;then
kill $PID
echo "could not find RX data"
stop
fi
grep "RX data: 0 " out.tmp
if test $? = 0;then
kill $PID
echo "RX data was zero"
stop
fi
rm -f out.tmp
# There is an issue in nuttcp that makes it crash under docker if
# /proc/sys/net/ipv4/tcp_adv_win_scale does not exist.