diff options
author | stratospher <44024636+stratospher@users.noreply.github.com> | 2024-03-19 10:58:18 +0530 |
---|---|---|
committer | 0xb10c <b10c@b10c.me> | 2024-03-19 17:41:57 +0100 |
commit | 99954f914f031c80aa53daa367fc049c4c55bdf3 (patch) | |
tree | 55e03ad075f7a8dc38aa846c1ca0da8d40f4dd7f /test/functional/rpc_net.py | |
parent | 0d01f6f0c6e53c9765f84e0616ab46b83923a6ad (diff) |
test: fix test to ensure hidden RPC is present in detailed help
current check to make sure that detailed help for hidden RPC
is displayed won't work because the assertion isn't sufficient.
Even if unknown RPCs are passed, RPC names would still be present
in node.help().
Diffstat (limited to 'test/functional/rpc_net.py')
-rwxr-xr-x | test/functional/rpc_net.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/functional/rpc_net.py b/test/functional/rpc_net.py index 5801f2ce43..48d86ab59d 100755 --- a/test/functional/rpc_net.py +++ b/test/functional/rpc_net.py @@ -324,10 +324,10 @@ class NetTest(BitcoinTestFramework): self.restart_node(1, ["-checkaddrman=1", "-test=addrman"], clear_addrman=True) node = self.nodes[1] - self.log.debug("Test that addpeerinfo is a hidden RPC") + self.log.debug("Test that addpeeraddress is a hidden RPC") # It is hidden from general help, but its detailed help may be called directly. - assert "addpeerinfo" not in node.help() - assert "addpeerinfo" in node.help("addpeerinfo") + assert "addpeeraddress" not in node.help() + assert "unknown command: addpeeraddress" not in node.help("addpeeraddress") self.log.debug("Test that adding an empty address fails") assert_equal(node.addpeeraddress(address="", port=8333), {"success": False}) @@ -452,7 +452,7 @@ class NetTest(BitcoinTestFramework): self.log.debug("Test that getrawaddrman is a hidden RPC") # It is hidden from general help, but its detailed help may be called directly. assert "getrawaddrman" not in node.help() - assert "getrawaddrman" in node.help("getrawaddrman") + assert "unknown command: getrawaddrman" not in node.help("getrawaddrman") def check_addr_information(result, expected): """Utility to compare a getrawaddrman result entry with an expected entry""" |