test: restrict multiple CLI arguments

This commit is contained in:
naiyoma
2024-07-26 19:27:25 +03:00
parent 8838c4f171
commit c8e6771af0
2 changed files with 4 additions and 1 deletions

View File

@@ -381,6 +381,9 @@ class TestBitcoinCli(BitcoinTestFramework):
assert_raises_process_error(1, "Could not connect to the server", self.nodes[0].cli('-rpcwait', '-rpcwaittimeout=5').echo)
assert_greater_than_or_equal(time.time(), start_time + 5)
self.log.info("Test that only one of -addrinfo, -generate, -getinfo, -netinfo may be specified at a time")
assert_raises_process_error(1, "Only one of -getinfo, -netinfo may be specified", self.nodes[0].cli('-getinfo', '-netinfo').send_cli)
if __name__ == '__main__':
TestBitcoinCli().main()