summaryrefslogtreecommitdiff
path: root/testing/do-tests
diff options
context:
space:
mode:
authorYves-Alexis Perez <corsac@debian.org>2014-07-11 07:23:31 +0200
committerYves-Alexis Perez <corsac@debian.org>2014-07-11 07:23:31 +0200
commit81c63b0eed39432878f78727f60a1e7499645199 (patch)
tree82387d8fecd1c20788fd8bd784a9b0bde091fb6b /testing/do-tests
parentc5ebfc7b9c16551fe825dc1d79c3f7e2f096f6c9 (diff)
downloadvyos-strongswan-81c63b0eed39432878f78727f60a1e7499645199.tar.gz
vyos-strongswan-81c63b0eed39432878f78727f60a1e7499645199.zip
Imported Upstream version 5.2.0
Diffstat (limited to 'testing/do-tests')
-rwxr-xr-xtesting/do-tests96
1 files changed, 81 insertions, 15 deletions
diff --git a/testing/do-tests b/testing/do-tests
index becb7f181..35f13ec5b 100755
--- a/testing/do-tests
+++ b/testing/do-tests
@@ -491,20 +491,47 @@ do
do
eval HOSTLOGIN=root@\$ipv4_${host}
- for command in statusall listall
- do
- ssh $SSHCONF $HOSTLOGIN ipsec $command \
- > $TESTRESULTDIR/${host}.$command 2>/dev/null
- done
+ scp $SSHCONF $HOSTLOGIN:/etc/strongswan.conf \
+ $TESTRESULTDIR/${host}.strongswan.conf > /dev/null 2>&1
- for file in strongswan.conf ipsec.conf ipsec.secrets
- do
- scp $SSHCONF $HOSTLOGIN:/etc/$file \
- $TESTRESULTDIR/${host}.$file > /dev/null 2>&1
- done
+ if [ $SUBDIR = "swanctl" ]
+ then
+ scp $SSHCONF $HOSTLOGIN:/etc/swanctl/swanctl.conf \
+ $TESTRESULTDIR/${host}.swanctl.conf > /dev/null 2>&1
+
+ ssh $SSHCONF $HOSTLOGIN swanctl --list-conns \
+ > $TESTRESULTDIR/${host}.swanctl.conns 2>/dev/null
+
+ ssh $SSHCONF $HOSTLOGIN swanctl --list-certs \
+ > $TESTRESULTDIR/${host}.swanctl.certs 2>/dev/null
+
+ ssh $SSHCONF $HOSTLOGIN swanctl --list-pools \
+ > $TESTRESULTDIR/${host}.swanctl.pools 2>/dev/null
+
+ ssh $SSHCONF $HOSTLOGIN swanctl --list-sas \
+ > $TESTRESULTDIR/${host}.swanctl.sas 2>/dev/null
- scp $SSHCONF $HOSTLOGIN:/etc/ipsec.d/ipsec.sql \
- $TESTRESULTDIR/${host}.ipsec.sql > /dev/null 2>&1
+ ssh $SSHCONF $HOSTLOGIN swanctl --list-pols \
+ > $TESTRESULTDIR/${host}.swanctl.pols 2>/dev/null
+
+ ssh $SSHCONF $HOSTLOGIN swanctl --stats \
+ > $TESTRESULTDIR/${host}.swanctl.stats 2>/dev/null
+ else
+ for file in ipsec.conf ipsec.secrets
+ do
+ scp $SSHCONF $HOSTLOGIN:/etc/$file \
+ $TESTRESULTDIR/${host}.$file > /dev/null 2>&1
+ done
+
+ for command in statusall listall
+ do
+ ssh $SSHCONF $HOSTLOGIN ipsec $command \
+ > $TESTRESULTDIR/${host}.$command 2>/dev/null
+ done
+
+ scp $SSHCONF $HOSTLOGIN:/etc/ipsec.d/ipsec.sql \
+ $TESTRESULTDIR/${host}.ipsec.sql > /dev/null 2>&1
+ fi
ssh $SSHCONF $HOSTLOGIN ip -s xfrm policy \
> $TESTRESULTDIR/${host}.ip.policy 2>/dev/null
@@ -515,7 +542,46 @@ do
ssh $SSHCONF $HOSTLOGIN $IPTABLES_CMD \
> $TESTRESULTDIR/${host}.iptables 2>/dev/null
chmod a+r $TESTRESULTDIR/*
- cat >> $TESTRESULTDIR/index.html <<@EOF
+
+ if [ $SUBDIR = "swanctl" ]
+ then
+ cat >> $TESTRESULTDIR/index.html <<@EOF
+ <h3>$host</h3>
+ <table border="0" cellspacing="0" width="600">
+ <tr>
+ <td valign="top">
+ <ul>
+ <li><a href="$host.swanctl.conf">swanctl.conf</a></li>
+ <li><a href="$host.swanctl.conns">swanctl --list-conns</a></li>
+ <li><a href="$host.swanctl.certs">swanctl --list-certs</a></li>
+ <li><a href="$host.swanctl.pools">swanctl --list-pools</a></li>
+ <li><a href="$host.strongswan.conf">strongswan.conf</a></li>
+ </ul>
+ </td>
+ <td valign="top">
+ <ul>
+ <li><a href="$host.swanctl.sas">swanctl --list-sas</a></li>
+ <li><a href="$host.swanctl.pols">swanctl --list-pols</a></li>
+ <li><a href="$host.swanctl.stats">swanctl --stats</a></li>
+ <li><a href="$host.auth.log">auth.log</a></li>
+ <li><a href="$host.daemon.log">daemon.log</a></li>
+ </ul>
+ </td>
+ <td valign="top">
+ <ul>
+ <li><a href="$host.ip.policy">ip -s xfrm policy</a></li>
+ <li><a href="$host.ip.state">ip -s xfrm state</a></li>
+ <li><a href="$host.ip.route">$IPROUTE_DSP</a></li>
+ <li><a href="$host.iptables">$IPTABLES_DSP</a></li>
+ </ul>
+ &nbsp;
+ </td>
+ </tr>
+ </table>
+@EOF
+
+ else
+ cat >> $TESTRESULTDIR/index.html <<@EOF
<h3>$host</h3>
<table border="0" cellspacing="0" width="600">
<tr>
@@ -546,7 +612,7 @@ do
</tr>
</table>
@EOF
-
+ fi
done
for host in $RADIUSHOSTS
@@ -653,7 +719,7 @@ do
for host in $IPSECHOSTS
do
eval HOSTLOGIN=root@\$ipv4_${host}
- ssh $SSHCONF $HOSTLOGIN "grep -E 'charon|last message repeated|imcv' \
+ ssh $SSHCONF $HOSTLOGIN "grep -E 'charon|last message repeated|imcv|pt-tls-client' \
/var/log/auth.log" >> $TESTRESULTDIR/${host}.auth.log
done