ctdb-tests: Adjust unit test output matching new ctdb
authorAmitay Isaacs <amitay@gmail.com>
Tue, 26 Jul 2016 03:55:41 +0000 (13:55 +1000)
committerStefan Metzmacher <metze@samba.org>
Thu, 28 Jul 2016 03:00:17 +0000 (05:00 +0200)
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
ctdb/tests/tool/ctdb.getcapabilities.003.sh
ctdb/tests/tool/ctdb.getvar.002.sh
ctdb/tests/tool/ctdb.lvs.008.sh
ctdb/tests/tool/ctdb.reloadnodes.003.sh
ctdb/tests/tool/ctdb.setdbreadonly.003.sh
ctdb/tests/tool/ctdb.setdbsticky.003.sh
ctdb/tests/tool/ctdb.setifacelink.002.sh
ctdb/tests/tool/ctdb.setvar.002.sh

index f087141454e32267a841224004894cdc62421046..91d38b8c9e336c8b15ffc1f270a1d5a7e48c4527 100755 (executable)
@@ -18,11 +18,10 @@ NODEMAP
 EOF
 
 required_result 1 <<EOF
-../client/ctdb_client.c:293 Failed to connect client socket to daemon. Errno:No such file or directory(2)
-../common/cmdline.c:167 Failed to connect to daemon
-Failed to init ctdb
-Failed to detect which PNN this node is
-Is this node part of a CTDB cluster?
+connect() failed, errno=2
+Failed to connect to CTDB daemon ($ctdbd_socket)
+Failed to detect PNN of the current node.
+Is this node part of CTDB cluster?
 EOF
 
 simple_test
index d9eb6f507ff01b7a55e5d5996c8984db16154861..c8aa302b768004991a4e55f121034776f4ca5e88 100755 (executable)
@@ -11,13 +11,7 @@ NODEMAP
 2       192.168.20.43   0x0
 EOF
 
-result_filter ()
-{
-       sed -e 's|^[^:]*:[0-9][0-9]* |FILE:LINE |'
-}
-
 required_result 1 <<EOF
-FILE:LINE ctdb_control for get_tunable failed
-Unable to get tunable variable 'TheQuickBrownFoxJumpsOverTheLazyDog'
+No such tunable TheQuickBrownFoxJumpsOverTheLazyDog
 EOF
 simple_test "TheQuickBrownFoxJumpsOverTheLazyDog"
index 63b0fa8bf0176cf673822fdb4cb4bacaee165a2a..a0e24b14afd8af76fcfc2c171abf16ffaca3df70 100755 (executable)
@@ -22,48 +22,44 @@ EOF
 
 #####
 
-required_result 10 <<EOF
-../client/ctdb_client.c:293 Failed to connect client socket to daemon. Errno:No such file or directory(2)
-../common/cmdline.c:167 Failed to connect to daemon
-Failed to init ctdb
-Failed to detect which PNN this node is
-Is this node part of a CTDB cluster?
+required_result 1 <<EOF
+connect() failed, errno=2
+Failed to connect to CTDB daemon ($ctdbd_socket)
+Failed to detect PNN of the current node.
+Is this node part of CTDB cluster?
 EOF
 
 simple_test list
 
 #####
 
-required_result 10 <<EOF
-../client/ctdb_client.c:293 Failed to connect client socket to daemon. Errno:No such file or directory(2)
-../common/cmdline.c:167 Failed to connect to daemon
-Failed to init ctdb
-Failed to detect which PNN this node is
-Is this node part of a CTDB cluster?
+required_result 1 <<EOF
+connect() failed, errno=2
+Failed to connect to CTDB daemon ($ctdbd_socket)
+Failed to detect PNN of the current node.
+Is this node part of CTDB cluster?
 EOF
 
 simple_test master
 
 #####
 
-required_result 10 <<EOF
-../client/ctdb_client.c:293 Failed to connect client socket to daemon. Errno:No such file or directory(2)
-../common/cmdline.c:167 Failed to connect to daemon
-Failed to init ctdb
-Failed to detect which PNN this node is
-Is this node part of a CTDB cluster?
+required_result 1 <<EOF
+connect() failed, errno=2
+Failed to connect to CTDB daemon ($ctdbd_socket)
+Failed to detect PNN of the current node.
+Is this node part of CTDB cluster?
 EOF
 
 simple_test list
 
 #####
 
-required_result 10 <<EOF
-../client/ctdb_client.c:293 Failed to connect client socket to daemon. Errno:No such file or directory(2)
-../common/cmdline.c:167 Failed to connect to daemon
-Failed to init ctdb
-Failed to detect which PNN this node is
-Is this node part of a CTDB cluster?
+required_result 1 <<EOF
+connect() failed, errno=2
+Failed to connect to CTDB daemon ($ctdbd_socket)
+Failed to detect PNN of the current node.
+Is this node part of CTDB cluster?
 EOF
 
 simple_test status
index 66d3d38de643a06833ac2326110b8852df2d29fd..88e105f2047251e96ef607a1f70543bb94d8bffc 100755 (executable)
@@ -26,8 +26,7 @@ NODEMAP
 EOF
 
 required_result 1 <<EOF
-ctdb_control error: 'Failed to read nodes file'
-ctdb_control error: 'Failed to read nodes file'
+Control GET_NODES_FILE failed, ret=-1
 ERROR: Failed to get nodes file from node 1
 EOF
 
index 9e472c31eae31fcd8dd261f6318035f1e09f9b91..3781601be45576d0cacdf5ac75736953d0b31684 100755 (executable)
@@ -18,15 +18,8 @@ DBMAP
 0x6cf2837d registry.tdb PERSISTENT 42
 EOF
 
-result_filter ()
-{
-       sed -e 's|^[^:]*:[0-9][0-9]* |FILE:LINE |'
-}
-
 required_result 1 <<EOF
-ctdb_control error: 'Can not set READONLY on persistent db'
-FILE:LINE ctdb_ctrl_set_db_readonly_recv failed  ret:22 res:-1
-Unable to set db to support readonly
+Cannot set READONLY on persistent DB
 EOF
 simple_test secrets.tdb
 
index ca8dd9c7782c668d0e50fa9b6499363b38ad5862..aa0efcab1b8dd6b3240cbc6e81fb20e6db12cb67 100755 (executable)
@@ -18,15 +18,8 @@ DBMAP
 0x6cf2837d registry.tdb PERSISTENT 42
 EOF
 
-result_filter ()
-{
-       sed -e 's|^[^:]*:[0-9][0-9]* |FILE:LINE |'
-}
-
 required_result 1 <<EOF
-ctdb_control error: 'Can not set STICKY on persistent db'
-FILE:LINE ctdb_ctrl_set_db_sticky_recv failed  ret:22 res:-1
-Unable to set db to support sticky records
+Cannot set STICKY on persistent DB
 EOF
 simple_test secrets.tdb
 
index c1a3119479e140a0fcbadfb6e7706c23dac96cca..a27062ed055ef73c05548c6129a4042bd54d8774 100755 (executable)
@@ -16,14 +16,7 @@ IFACES
 :eth1:0:4:
 EOF
 
-result_filter ()
-{
-       sed -e 's|^[^:]*:[0-9][0-9]* |FILE:LINE |'
-}
-
 required_result 1 <<EOF
-ctdb_control error: 'interface not found'
-FILE:LINE ctdb_control for set iface link failed ret:-1 res:-1
-Unable to set link state for interfaces eth0 node 0
+Interface eth0 not configured on node 0
 EOF
 simple_test eth0 down
index 281316178e9831d9b2a0237212ce8b7283edc0e9..bf788a27fca2a9adb7e5ea202d3802ba193a3043 100755 (executable)
@@ -11,13 +11,7 @@ NODEMAP
 2       192.168.20.43   0x0
 EOF
 
-result_filter ()
-{
-       sed -e 's|^[^:]*:[0-9][0-9]* |FILE:LINE |'
-}
-
 required_result 1 <<EOF
-FILE:LINE ctdb_control for set_tunable failed
-Unable to set tunable variable 'TheQuickBrownFoxJumpsOverTheLazyDog'
+No such tunable TheQuickBrownFoxJumpsOverTheLazyDog
 EOF
 simple_test "TheQuickBrownFoxJumpsOverTheLazyDog" 42