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)
# 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
# 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"