aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMatt Corallo <git@bluematt.me>2017-07-16 19:29:08 -0400
committerMatt Corallo <git@bluematt.me>2017-09-06 16:10:04 -0700
commitaece8a4637f0d097e4be497bc82d59b37244d245 (patch)
tree11567fae24b604ce4eb35f0704d51c7081e231ff /test
parent961901f77e55aa07d5048000d57bcd218ae74b08 (diff)
(finally) remove getinfo in favor of more module-specific infos
Diffstat (limited to 'test')
-rwxr-xr-xtest/functional/bitcoin_cli.py12
-rwxr-xr-xtest/functional/p2p-versionbits-warning.py3
-rwxr-xr-xtest/functional/rpcnamedargs.py6
3 files changed, 12 insertions, 9 deletions
diff --git a/test/functional/bitcoin_cli.py b/test/functional/bitcoin_cli.py
index 7acfede3f7..04847252eb 100755
--- a/test/functional/bitcoin_cli.py
+++ b/test/functional/bitcoin_cli.py
@@ -15,9 +15,15 @@ class TestBitcoinCli(BitcoinTestFramework):
def run_test(self):
"""Main test logic"""
- self.log.info("Compare responses from getinfo RPC and `bitcoin-cli getinfo`")
- cli_get_info = self.nodes[0].cli.getinfo()
- rpc_get_info = self.nodes[0].getinfo()
+ self.log.info("Compare responses from gewalletinfo RPC and `bitcoin-cli getwalletinfo`")
+ cli_get_info = self.nodes[0].cli.getwalletinfo()
+ rpc_get_info = self.nodes[0].getwalletinfo()
+
+ assert_equal(cli_get_info, rpc_get_info)
+
+ self.log.info("Compare responses from getblockchaininfo RPC and `bitcoin-cli getblockchaininfo`")
+ cli_get_info = self.nodes[0].cli.getblockchaininfo()
+ rpc_get_info = self.nodes[0].getblockchaininfo()
assert_equal(cli_get_info, rpc_get_info)
diff --git a/test/functional/p2p-versionbits-warning.py b/test/functional/p2p-versionbits-warning.py
index 5dfac6dd10..0848fcde64 100755
--- a/test/functional/p2p-versionbits-warning.py
+++ b/test/functional/p2p-versionbits-warning.py
@@ -87,7 +87,6 @@ class VersionBitsWarningTest(BitcoinTestFramework):
self.nodes[0].generate(VB_PERIOD - VB_THRESHOLD + 1)
# Check that we're not getting any versionbit-related errors in
# get*info()
- assert(not VB_PATTERN.match(self.nodes[0].getinfo()["errors"]))
assert(not VB_PATTERN.match(self.nodes[0].getmininginfo()["errors"]))
assert(not VB_PATTERN.match(self.nodes[0].getnetworkinfo()["warnings"]))
@@ -99,7 +98,6 @@ class VersionBitsWarningTest(BitcoinTestFramework):
# have gotten a different alert due to more than 51/100 blocks
# being of unexpected version.
# Check that get*info() shows some kind of error.
- assert(WARN_UNKNOWN_RULES_MINED in self.nodes[0].getinfo()["errors"])
assert(WARN_UNKNOWN_RULES_MINED in self.nodes[0].getmininginfo()["errors"])
assert(WARN_UNKNOWN_RULES_MINED in self.nodes[0].getnetworkinfo()["warnings"])
@@ -115,7 +113,6 @@ class VersionBitsWarningTest(BitcoinTestFramework):
# Connecting one block should be enough to generate an error.
self.nodes[0].generate(1)
- assert(WARN_UNKNOWN_RULES_ACTIVE in self.nodes[0].getinfo()["errors"])
assert(WARN_UNKNOWN_RULES_ACTIVE in self.nodes[0].getmininginfo()["errors"])
assert(WARN_UNKNOWN_RULES_ACTIVE in self.nodes[0].getnetworkinfo()["warnings"])
self.stop_nodes()
diff --git a/test/functional/rpcnamedargs.py b/test/functional/rpcnamedargs.py
index da61cc66e6..b3cc681dad 100755
--- a/test/functional/rpcnamedargs.py
+++ b/test/functional/rpcnamedargs.py
@@ -16,10 +16,10 @@ class NamedArgumentTest(BitcoinTestFramework):
def run_test(self):
node = self.nodes[0]
- h = node.help(command='getinfo')
- assert(h.startswith('getinfo\n'))
+ h = node.help(command='getblockchaininfo')
+ assert(h.startswith('getblockchaininfo\n'))
- assert_raises_jsonrpc(-8, 'Unknown named parameter', node.help, random='getinfo')
+ assert_raises_jsonrpc(-8, 'Unknown named parameter', node.help, random='getblockchaininfo')
h = node.getblockhash(height=0)
node.getblock(blockhash=h)