From 1531a1777a68ce11f21b9865f4df5937a85ef8af Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Mon, 24 Dec 2018 11:10:53 -0800 Subject: [PATCH] Add RPC API check --- ci/localnet-sanity.sh | 9 +++++++++ net/remote/remote-sanity.sh | 11 ++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/ci/localnet-sanity.sh b/ci/localnet-sanity.sh index 766801be72..a0d65c2d0f 100755 --- a/ci/localnet-sanity.sh +++ b/ci/localnet-sanity.sh @@ -82,6 +82,15 @@ echo "--- Node count" rm -rf $client_id ) || flag_error +echo "--- RPC API: getTransactionCount" +( + set -x + curl -X POST \ + -H 'Content-Type: application/json' \ + -d '{"jsonrpc":"2.0","id":1, "method":"getTransactionCount"}' \ + http://localhost:8899 +) || flag_error + killBackgroundCommands echo "--- Ledger verification" diff --git a/net/remote/remote-sanity.sh b/net/remote/remote-sanity.sh index f475253fba..c13244a0b6 100755 --- a/net/remote/remote-sanity.sh +++ b/net/remote/remote-sanity.sh @@ -90,10 +90,19 @@ local|tar) esac +echo "--- RPC API: getTransactionCount" +( + set -x + curl -X POST \ + -H 'Content-Type: application/json' \ + -d '{"jsonrpc":"2.0","id":1, "method":"getTransactionCount"}' \ + http://"$entrypointIp":8899 +) + echo "--- $entrypointIp: wallet sanity" ( set -x - scripts/wallet-sanity.sh "$entrypointIp:8001" + scripts/wallet-sanity.sh "$entrypointIp":8001 ) echo "+++ $entrypointIp: node count ($numNodes expected)"