From 71276a53b5035a55395b0bc111c5968d002caaae Mon Sep 17 00:00:00 2001 From: Ethan Frey Date: Sun, 16 Jul 2017 20:48:41 +0200 Subject: [PATCH] A failing cli test demonstating the missing query nonce command --- tests/cli/basictx.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/cli/basictx.sh b/tests/cli/basictx.sh index 80d5c71f4e..009e1ddc02 100755 --- a/tests/cli/basictx.sh +++ b/tests/cli/basictx.sh @@ -70,6 +70,15 @@ test02SendTxWithFee() { assertFalse "replay: $TX" $? checkAccount $SENDER "9007199254739900" checkAccount $RECV "1082" + + # make sure we can query the proper nonce + NONCE=$(${CLIENT_EXE} query nonce $SENDER) + if [ -n "$DEBUG" ]; then echo $NONCE; echo; fi + # TODO: note that cobra returns error code 0 on parse failure, + # so currently this check passes even if there is no nonce query command + if assertTrue "no nonce query" $?; then + assertEquals "line=${LINENO}, proper nonce" "2" $(echo $NONCE | jq .data) + fi }