diff options
author | Amitay Isaacs <amitay@gmail.com> | 2016-07-26 13:30:18 +1000 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2016-07-28 05:00:16 +0200 |
commit | dc065b1f358c8a15f277d5b138070d7251ff7452 (patch) | |
tree | c1bdffaef5be9477c1ea4e60ac15915d4770c727 /ctdb/tests | |
parent | 5d34755be384b4a5b6f627cb1b35539e6e8da31d (diff) | |
download | samba-dc065b1f358c8a15f277d5b138070d7251ff7452.tar.gz |
ctdb-tests: Add machinereadable output tests
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Diffstat (limited to 'ctdb/tests')
-rwxr-xr-x | ctdb/tests/tool/ctdb.nodestatus.001.sh | 9 | ||||
-rwxr-xr-x | ctdb/tests/tool/ctdb.nodestatus.002.sh | 9 | ||||
-rwxr-xr-x | ctdb/tests/tool/ctdb.status.001.sh | 9 | ||||
-rwxr-xr-x | ctdb/tests/tool/ctdb.status.002.sh | 9 |
4 files changed, 32 insertions, 4 deletions
diff --git a/ctdb/tests/tool/ctdb.nodestatus.001.sh b/ctdb/tests/tool/ctdb.nodestatus.001.sh index d97892e9639..2217afcc0b9 100755 --- a/ctdb/tests/tool/ctdb.nodestatus.001.sh +++ b/ctdb/tests/tool/ctdb.nodestatus.001.sh @@ -22,5 +22,12 @@ pnn:0 192.168.20.41 OK pnn:1 192.168.20.42 OK pnn:2 192.168.20.43 OK (THIS NODE) EOF - simple_test all + +required_result 0 <<EOF +|Node|IP|Disconnected|Banned|Disabled|Unhealthy|Stopped|Inactive|PartiallyOnline|ThisNode| +|0|192.168.20.41|0|0|0|0|0|0|0|N| +|1|192.168.20.42|0|0|0|0|0|0|0|N| +|2|192.168.20.43|0|0|0|0|0|0|0|Y| +EOF +simple_test -X all diff --git a/ctdb/tests/tool/ctdb.nodestatus.002.sh b/ctdb/tests/tool/ctdb.nodestatus.002.sh index 3f8d6935dc2..c1706fd98e7 100755 --- a/ctdb/tests/tool/ctdb.nodestatus.002.sh +++ b/ctdb/tests/tool/ctdb.nodestatus.002.sh @@ -22,5 +22,12 @@ pnn:0 192.168.20.41 OK pnn:1 192.168.20.42 DISCONNECTED|INACTIVE pnn:2 192.168.20.43 OK (THIS NODE) EOF - simple_test all + +required_result 1 <<EOF +|Node|IP|Disconnected|Banned|Disabled|Unhealthy|Stopped|Inactive|PartiallyOnline|ThisNode| +|0|192.168.20.41|0|0|0|0|0|0|0|N| +|1|192.168.20.42|1|0|0|0|0|1|0|N| +|2|192.168.20.43|0|0|0|0|0|0|0|Y| +EOF +simple_test -X all diff --git a/ctdb/tests/tool/ctdb.status.001.sh b/ctdb/tests/tool/ctdb.status.001.sh index ed324cd77c6..13324ef0dd9 100755 --- a/ctdb/tests/tool/ctdb.status.001.sh +++ b/ctdb/tests/tool/ctdb.status.001.sh @@ -35,5 +35,12 @@ hash:2 lmaster:2 Recovery mode:NORMAL (0) Recovery master:0 EOF - simple_test + +required_result 0 <<EOF +|Node|IP|Disconnected|Banned|Disabled|Unhealthy|Stopped|Inactive|PartiallyOnline|ThisNode| +|0|192.168.20.41|0|0|0|0|0|0|0|Y| +|1|192.168.20.42|0|0|0|0|0|0|0|N| +|2|192.168.20.43|0|0|0|0|0|0|0|N| +EOF +simple_test -X diff --git a/ctdb/tests/tool/ctdb.status.002.sh b/ctdb/tests/tool/ctdb.status.002.sh index 233847170df..3fd8d1cf711 100755 --- a/ctdb/tests/tool/ctdb.status.002.sh +++ b/ctdb/tests/tool/ctdb.status.002.sh @@ -35,5 +35,12 @@ hash:2 lmaster:2 Recovery mode:NORMAL (0) Recovery master:1 EOF - simple_test + +required_result 0 <<EOF +|Node|IP|Disconnected|Banned|Disabled|Unhealthy|Stopped|Inactive|PartiallyOnline|ThisNode| +|0|192.168.20.41|0|0|0|1|0|0|0|N| +|1|192.168.20.42|0|0|0|0|0|0|0|Y| +|2|192.168.20.43|0|0|0|0|0|0|0|N| +EOF +simple_test -X |