|
@ -5,7 +5,7 @@ echo "Dummy test ..." |
|
|
dummy &> /dev/null & |
|
|
dummy &> /dev/null & |
|
|
PID=`echo $!` |
|
|
PID=`echo $!` |
|
|
sleep 1 |
|
|
sleep 1 |
|
|
RESULT_HASH=`tmsp get_hash` |
|
|
|
|
|
|
|
|
RESULT_HASH=`tmsp-cli get_hash` |
|
|
if [[ "$RESULT_HASH" != "" ]]; then |
|
|
if [[ "$RESULT_HASH" != "" ]]; then |
|
|
echo "Expected nothing but got: $RESULT_HASH" |
|
|
echo "Expected nothing but got: $RESULT_HASH" |
|
|
exit 1 |
|
|
exit 1 |
|
@ -16,7 +16,7 @@ echo "" |
|
|
# Add a tx, get hash, commit, get hash |
|
|
# Add a tx, get hash, commit, get hash |
|
|
# hashes should be non-empty and identical |
|
|
# hashes should be non-empty and identical |
|
|
echo "Dummy batch test ..." |
|
|
echo "Dummy batch test ..." |
|
|
OUTPUT=`(tmsp batch) <<STDIN |
|
|
|
|
|
|
|
|
OUTPUT=`(tmsp-cli batch) <<STDIN |
|
|
append_tx abc |
|
|
append_tx abc |
|
|
get_hash |
|
|
get_hash |
|
|
commit |
|
|
commit |
|
@ -31,6 +31,11 @@ if [[ "$HASH1" == "" ]]; then |
|
|
exit 1 |
|
|
exit 1 |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
if [[ "$HASH1" == "EOF" ]]; then |
|
|
|
|
|
echo "Expected hash not broken connection!" |
|
|
|
|
|
exit 1 |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
if [[ "$HASH1" != "$HASH2" ]]; then |
|
|
if [[ "$HASH1" != "$HASH2" ]]; then |
|
|
echo "Expected hashes before and after commit to match: $HASH1, $HASH2" |
|
|
echo "Expected hashes before and after commit to match: $HASH1, $HASH2" |
|
|
exit 1 |
|
|
exit 1 |
|
@ -40,7 +45,7 @@ echo "" |
|
|
|
|
|
|
|
|
# Start a new connection and ensure the hash is the same |
|
|
# Start a new connection and ensure the hash is the same |
|
|
echo "New connection test ..." |
|
|
echo "New connection test ..." |
|
|
RESULT_HASH=`tmsp get_hash` |
|
|
|
|
|
|
|
|
RESULT_HASH=`tmsp-cli get_hash` |
|
|
if [[ "$HASH1" != "$RESULT_HASH" ]]; then |
|
|
if [[ "$HASH1" != "$RESULT_HASH" ]]; then |
|
|
echo "Expected hash to persist as $HASH1 for new connection. Got $RESULT_HASH" |
|
|
echo "Expected hash to persist as $HASH1 for new connection. Got $RESULT_HASH" |
|
|
exit 1 |
|
|
exit 1 |
|
|