diff options
author | Stefan Metzmacher <metze@samba.org> | 2010-01-15 10:53:14 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2010-01-20 11:11:00 +0100 |
commit | 04d896a5feece12c6576dbcf807213760dafa010 (patch) | |
tree | efe303fb0957575267ed278d1d73b1719b893c03 /ctdb/tests | |
parent | df5805d6a02654371769327582ae75b835c62041 (diff) | |
download | samba-04d896a5feece12c6576dbcf807213760dafa010.tar.gz samba-04d896a5feece12c6576dbcf807213760dafa010.tar.xz samba-04d896a5feece12c6576dbcf807213760dafa010.zip |
tests/simple/11_ctdb_ip.sh: be more strict in checking ctdb ip -Y output
metze
(This used to be ctdb commit 27bde04966e22975777b4034dbaccfe158369110)
Diffstat (limited to 'ctdb/tests')
-rwxr-xr-x | ctdb/tests/simple/11_ctdb_ip.sh | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/ctdb/tests/simple/11_ctdb_ip.sh b/ctdb/tests/simple/11_ctdb_ip.sh index 40cd795628..6ea1f956c3 100755 --- a/ctdb/tests/simple/11_ctdb_ip.sh +++ b/ctdb/tests/simple/11_ctdb_ip.sh @@ -33,8 +33,15 @@ cluster_is_healthy echo "Getting list of public IPs..." try_command_on_node -v 1 $CTDB ip -n all -ips=$(echo "$out" | sed -e '1d') -colons=$(echo "$ips" | sed -e 's@^@:@' -e 's@$@:@' -e 's@ @:@') +ips=$(echo "$out" | sed \ + -e '1d') +machineout1=":Public IP:Node:" +machineout2=$(echo "$out" | sed \ + -e '1d' \ + -e 's@^@:@' \ + -e 's@ @:@' \ + -e 's@$@:@') +machineout=`echo -e "$machineout1\n$machineout2"` while read ip pnn ; do try_command_on_node $pnn "ip addr show" @@ -48,14 +55,16 @@ done <<<"$ips" # bashism to avoid problem setting variable in pipeline. [ "$testfailures" != 1 ] && echo "Looks good!" -cmd="$CTDB -Y ip -n all | sed -e '1d'" +cmd="$CTDB -Y ip -n all" echo "Checking that \"$cmd\" produces expected output..." try_command_on_node 1 "$cmd" -if [ "$out" = "$colons" ] ; then +if [ "$out" = "$machineout" ] ; then echo "Yep, looks good!" else echo "Nope, it looks like this:" echo "$out" + echo "Should be like this:" + echo "$machineout" testfailures=1 fi |