diff options
author | Amitay Isaacs <amitay@gmail.com> | 2012-03-28 13:51:25 +1100 |
---|---|---|
committer | Amitay Isaacs <amitay@gmail.com> | 2012-04-13 14:51:13 +1000 |
commit | db13fd893c909a9ad2f13671282ce4c286941d4f (patch) | |
tree | bd4c683631340396ff9d6c82e4e9725448a2d608 | |
parent | 425b8768ee3ec7985e0fc206709ac647f2354730 (diff) | |
download | samba-db13fd893c909a9ad2f13671282ce4c286941d4f.tar.gz samba-db13fd893c909a9ad2f13671282ce4c286941d4f.tar.xz samba-db13fd893c909a9ad2f13671282ce4c286941d4f.zip |
tests: Check for assigned IP addresses only if we are on real cluster
This fixes the ctdb_ip test when running against local daemons.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit a108fc14d90b6d552736d19b0ea104f2508dc331)
-rwxr-xr-x | ctdb/tests/simple/11_ctdb_ip.sh | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/ctdb/tests/simple/11_ctdb_ip.sh b/ctdb/tests/simple/11_ctdb_ip.sh index e85884541a..0d7dc5a342 100755 --- a/ctdb/tests/simple/11_ctdb_ip.sh +++ b/ctdb/tests/simple/11_ctdb_ip.sh @@ -41,15 +41,17 @@ machineout=$(echo "$out" | sed -r \ -e 's@[[:alpha:]]+\[@@g' \ -e 's@\]@@g') -while read ip pnn ; do - try_command_on_node $pnn "ip addr show" - if [ "${out/inet ${ip}\/}" != "$out" ] ; then - echo "GOOD: node $pnn appears to have $ip assigned" - else - echo "BAD: node $pnn does not appear to have $ip assigned" - testfailures=1 - fi -done <<<"$ips" # bashism to avoid problem setting variable in pipeline. +if [ -n "$CTDB_TEST_REAL_CLUSTER" ]; then + while read ip pnn ; do + try_command_on_node $pnn "ip addr show" + if [ "${out/inet ${ip}\/}" != "$out" ] ; then + echo "GOOD: node $pnn appears to have $ip assigned" + else + echo "BAD: node $pnn does not appear to have $ip assigned" + testfailures=1 + fi + done <<<"$ips" # bashism to avoid problem setting variable in pipeline. +fi [ "$testfailures" != 1 ] && echo "Looks good!" |