tests:76_ctdb_pdb_recovery: change from using ctdb pstore to ctdb ptrans.
authorMichael Adam <obnox@samba.org>
Wed, 27 Nov 2013 10:42:28 +0000 (11:42 +0100)
committerAmitay Isaacs <amitay@gmail.com>
Fri, 31 Jan 2014 05:04:31 +0000 (16:04 +1100)
This removes the requirement to create a temporary file
and hence makes this test runnable against local daemons
and against a real cluster without further changes.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(Imported from commit e281cfa8db4a2506f9016718373cdc80f4aa9c1f)

tests/simple/76_ctdb_pdb_recovery.sh

index 959ef7da9bfd99985cc8df866ea5a7f4bf03c5d7..1c897c2ff24b3876f51fb3155b6f37e1d2e754f6 100755 (executable)
@@ -47,8 +47,7 @@ try_command_on_node 0 $CTDB wipedb $TESTDB
 # and update values
 for value in value1 value2 value3 value4 value5 ; do
        echo "store key(test1) data($value)"
-       try_command_on_node 0 "(echo -ne $value > /tmp/test_data)"
-       try_command_on_node 0 $CTDB pstore $TESTDB test1 /tmp/test_data
+       echo "\"test1\" \"$value\"" | try_command_on_node -i 0 $CTDB ptrans "$TESTDB"
 done
 
 # Delete record
@@ -63,8 +62,7 @@ wait_until_node_has_status 1 stopped
 
 # Add a record   key=test1 data=value2
 echo "store key(test1) data(newvalue1)"
-try_command_on_node 0 "(echo -ne newvalue1 > /tmp/test_data)"
-try_command_on_node 0 $CTDB pstore $TESTDB test1 /tmp/test_data
+echo '"test1" "newvalue1"' | try_command_on_node -i 0 $CTDB ptrans "$TESTDB"
 
 # Continue node
 echo "contine node 1"