Commit e8832eca authored by linj's avatar linj

fix unfreeze test

parent 37db92bc
...@@ -26,7 +26,7 @@ function unfreeze_test() { ...@@ -26,7 +26,7 @@ function unfreeze_test() {
tx_hash=$(${CLI} send unfreeze create fix_amount -a 0.01 -e coins -s bty -b ${beneficiary} -p 20 -t 2 -k ${owner_key}) tx_hash=$(${CLI} send unfreeze create fix_amount -a 0.01 -e coins -s bty -b ${beneficiary} -p 20 -t 2 -k ${owner_key})
block_wait "${CLI}" 2 block_wait "${CLI}" 2
unfreeze_id=$(${CLI} tx query -s "${tx_hash}" | jq ".receipt.logs[2].log.current.unfreezeID") unfreeze_id=$(${CLI} tx query -s "${tx_hash}" | jq ".receipt.logs[2].log.current.unfreezeID")
echo "$unfreeze_id" echo "${unfreeze_id}"
unfreeze_id2=${unfreeze_id#\"mavl-unfreeze-} unfreeze_id2=${unfreeze_id#\"mavl-unfreeze-}
uid=${unfreeze_id2%\"} uid=${unfreeze_id2%\"}
...@@ -51,8 +51,9 @@ function unfreeze_test() { ...@@ -51,8 +51,9 @@ function unfreeze_test() {
${CLI} send unfreeze terminate --id "${uid}" -k "${owner_key}" ${CLI} send unfreeze terminate --id "${uid}" -k "${owner_key}"
block_wait "${CLI}" 2 block_wait "${CLI}" 2
remaining=$(${CLI} unfreeze show --id "${uid}" | jq ".remaining") remaining=$(${CLI} unfreeze show --id "${uid}" | jq ".remaining")
if [ "${remaining}" != '"0"' ]; then remainingNum=`echo $a | awk '{print int($0)}'`
echo "terminate failed, expect remaining 0, result ${remaining}" if [ "100000000" -lt ${remainingNum} ]; then
echo "terminate failed, expect remaining < 100000000, result ${remaining}"
exit 1 exit 1
fi fi
echo "==================== unfreeze test end" echo "==================== unfreeze test end"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment