From a2f52c58ccea058dd2c853b13326e387e198296a Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Mon, 16 Feb 2015 13:17:29 +0100 Subject: [PATCH] full/unix-test: updated for new IP assignments --- tests/docker-ocserv/Dockerfile-fedora-tcp | 1 + tests/docker-ocserv/Dockerfile-fedora-unix | 1 + tests/docker-ocserv/ocserv.conf | 2 +- tests/full-test | 14 +++++++------- tests/unix-test | 12 ++++++------ 5 files changed, 16 insertions(+), 14 deletions(-) diff --git a/tests/docker-ocserv/Dockerfile-fedora-tcp b/tests/docker-ocserv/Dockerfile-fedora-tcp index 6987c27d..ff04ffa0 100644 --- a/tests/docker-ocserv/Dockerfile-fedora-tcp +++ b/tests/docker-ocserv/Dockerfile-fedora-tcp @@ -3,6 +3,7 @@ FROM fedora:21 RUN yum install -y gnutls gnutls-utils protobuf-c iproute pcllib http-parser tcp_wrappers pam systemd libseccomp RUN yum install -y bash openssh-server nuttcp RUN yum install -y libnl3 libtalloc +RUN yum install -y freeradius-client RUN yum install -y lz4 RUN systemctl enable sshd RUN sed 's/PermitRootLogin without-password/PermitRootLogin yes/g' -i /etc/ssh/sshd_config diff --git a/tests/docker-ocserv/Dockerfile-fedora-unix b/tests/docker-ocserv/Dockerfile-fedora-unix index afd50b63..596be1e1 100644 --- a/tests/docker-ocserv/Dockerfile-fedora-unix +++ b/tests/docker-ocserv/Dockerfile-fedora-unix @@ -4,6 +4,7 @@ RUN yum install -y gnutls gnutls-utils protobuf-c iproute pcllib http-parser tcp RUN yum install -y bash openssh-server nuttcp RUN systemctl enable sshd RUN yum install -y libnl3 libtalloc haproxy +RUN yum install -y freeradius-client RUN sed 's/PermitRootLogin without-password/PermitRootLogin yes/g' -i /etc/ssh/sshd_config RUN echo 'root:root' |chpasswd diff --git a/tests/docker-ocserv/ocserv.conf b/tests/docker-ocserv/ocserv.conf index 8b509881..2f62d2fe 100644 --- a/tests/docker-ocserv/ocserv.conf +++ b/tests/docker-ocserv/ocserv.conf @@ -249,7 +249,7 @@ ping-leases = false # comment out all routes from the server. route = 192.168.1.0/255.255.255.0 #route = 192.168.5.0/255.255.255.0 -#route = fef4:db8:1000:1001::/64 +route = fd91:6d87:7341:db6a::/64 # Configuration files that will be applied per user connection or # per group. Each file name on these directories must match the username diff --git a/tests/full-test b/tests/full-test index d911aef6..2f9876b9 100755 --- a/tests/full-test +++ b/tests/full-test @@ -63,21 +63,21 @@ rm -f pass.tmp sleep 5 # The client IP depends on the username so it shouldn't change. -ping -w 5 192.168.1.190 +ping -w 5 192.168.1.0 if test $? != 0;then kill $PID echo "Cannot ping ocserv" stop fi -ping -w 5 192.168.1.190 -s 1500 +ping -w 5 192.168.1.0 -s 1500 if test $? != 0;then kill $PID echo "Cannot ping ocserv" stop fi -ping6 -w 5 fd91:6d87:7341:db6a:0:52:190c:be00 +ping6 -w 5 fd91:6d87:7341:db6a:: if test $? != 0;then kill $PID echo "Cannot ping the IPv6 of ocserv" @@ -91,14 +91,14 @@ printf "echo root" >>echo-admin.tmp printf "\n" >>echo-admin.tmp chmod 755 echo-admin.tmp export SSH_ASKPASS="./echo-admin.tmp" -setsid ssh -T -F config.tmp root@192.168.1.190 occtl show user test >out.tmp 2>&1 +setsid ssh -T -F config.tmp root@192.168.1.0 occtl show user test >out.tmp 2>&1 cat out.tmp printf "#\!/bin/sh\n" >echo-admin.tmp printf "echo root" >>echo-admin.tmp printf "\n" >>echo-admin.tmp chmod 755 echo-admin.tmp -setsid ssh -T -F config.tmp root@192.168.1.190 occtl show user test >out.tmp 2>&1 +setsid ssh -T -F config.tmp root@192.168.1.0 occtl show user test >out.tmp 2>&1 cat out.tmp rm -f echo-admin.tmp rm -f config.tmp @@ -116,14 +116,14 @@ 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. if test "$FEDORA" = 1;then -nuttcp -T 10 -t 192.168.1.190 +nuttcp -T 10 -t 192.168.1.0 if test $? != 0;then kill $PID echo "Cannot send to ocserv" stop fi -nuttcp -T 10 -r 192.168.1.190 +nuttcp -T 10 -r 192.168.1.0 if test $? != 0;then kill $PID echo "Cannot recv from ocserv" diff --git a/tests/unix-test b/tests/unix-test index 89136238..1aae30c7 100755 --- a/tests/unix-test +++ b/tests/unix-test @@ -62,14 +62,14 @@ rm -f pass.tmp sleep 5 # The client IP depends on the username so it shouldn't change. -ping -w 5 192.168.99.190 +ping -w 5 192.168.99.0 if test $? != 0;then kill $PID echo "Cannot ping ocserv" stop fi -ping -w 5 192.168.99.190 -s 1500 +ping -w 5 192.168.99.0 -s 1500 if test $? != 0;then kill $PID echo "Cannot ping ocserv" @@ -83,14 +83,14 @@ printf "echo root" >>echo-admin.tmp printf "\n" >>echo-admin.tmp chmod 755 echo-admin.tmp export SSH_ASKPASS="./echo-admin.tmp" -setsid ssh -T -F config.tmp root@192.168.99.190 occtl show user test >out.tmp 2>&1 +setsid ssh -T -F config.tmp root@192.168.99.0 occtl show user test >out.tmp 2>&1 cat out.tmp printf "#\!/bin/sh\n" >echo-admin.tmp printf "echo root" >>echo-admin.tmp printf "\n" >>echo-admin.tmp chmod 755 echo-admin.tmp -setsid ssh -T -F config.tmp root@192.168.99.190 occtl show user test >out.tmp 2>&1 +setsid ssh -T -F config.tmp root@192.168.99.0 occtl show user test >out.tmp 2>&1 cat out.tmp rm -f echo-admin.tmp rm -f config.tmp @@ -108,14 +108,14 @@ 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. -#nuttcp -T 10 -t 192.168.99.190 +#nuttcp -T 10 -t 192.168.99.0 #if test $? != 0;then # kill $PID # echo "Cannot send to ocserv" # stop #fi -#nuttcp -T 10 -r 192.168.99.190 +#nuttcp -T 10 -r 192.168.99.0 #if test $? != 0;then # kill $PID # echo "Cannot recv from ocserv"