fix tests

This commit is contained in:
Ethan Buchman 2016-01-08 16:06:33 -05:00
parent 271a424d42
commit aa3e87450a
2 changed files with 10 additions and 5 deletions

View File

@ -17,7 +17,7 @@ if [[ "$?" != 0 ]]; then
fi
sleep 1
OUTPUT=`(tmsp batch) <<STDIN
OUTPUT=`(tmsp-cli batch) <<STDIN
set_option serial on
get_hash
append_tx abc
@ -38,7 +38,7 @@ if [[ "${HASH1}" != "" ]]; then
exit 1
fi
OUTPUT=`(tmsp batch) <<STDIN
OUTPUT=`(tmsp-cli batch) <<STDIN
set_option serial on
append_tx 0x00
get_hash

View File

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