mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-06-02 15:32:34 +02:00
test: assert logging categories are sorted in rpc and help
This commit is contained in:
parent
17bbff3b88
commit
d596dba987
@ -54,7 +54,7 @@ class RpcMiscTest(BitcoinTestFramework):
|
|||||||
|
|
||||||
assert_raises_rpc_error(-8, "unknown mode foobar", node.getmemoryinfo, mode="foobar")
|
assert_raises_rpc_error(-8, "unknown mode foobar", node.getmemoryinfo, mode="foobar")
|
||||||
|
|
||||||
self.log.info("test logging rpc")
|
self.log.info("test logging rpc and help")
|
||||||
|
|
||||||
# Test logging RPC returns the expected number of logging categories.
|
# Test logging RPC returns the expected number of logging categories.
|
||||||
assert_equal(len(node.logging()), 24)
|
assert_equal(len(node.logging()), 24)
|
||||||
@ -66,6 +66,15 @@ class RpcMiscTest(BitcoinTestFramework):
|
|||||||
node.logging(include=['qt'])
|
node.logging(include=['qt'])
|
||||||
assert_equal(node.logging()['qt'], True)
|
assert_equal(node.logging()['qt'], True)
|
||||||
|
|
||||||
|
# Test logging RPC returns the logging categories in alphabetical order.
|
||||||
|
sorted_logging_categories = sorted(node.logging())
|
||||||
|
assert_equal(list(node.logging()), sorted_logging_categories)
|
||||||
|
|
||||||
|
# Test logging help returns the logging categories string in alphabetical order.
|
||||||
|
categories = ', '.join(sorted_logging_categories)
|
||||||
|
logging_help = self.nodes[0].help('logging')
|
||||||
|
assert f"valid logging categories are: {categories}" in logging_help
|
||||||
|
|
||||||
self.log.info("test echoipc (testing spawned process in multiprocess build)")
|
self.log.info("test echoipc (testing spawned process in multiprocess build)")
|
||||||
assert_equal(node.echoipc("hello"), "hello")
|
assert_equal(node.echoipc("hello"), "hello")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user