summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2012-03-28 13:51:25 +1100
committerAmitay Isaacs <amitay@gmail.com>2012-04-13 14:51:13 +1000
commitdb13fd893c909a9ad2f13671282ce4c286941d4f (patch)
treebd4c683631340396ff9d6c82e4e9725448a2d608
parent425b8768ee3ec7985e0fc206709ac647f2354730 (diff)
downloadsamba-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-xctdb/tests/simple/11_ctdb_ip.sh20
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!"