mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-20 10:38:42 +01:00
Merge bitcoin/bitcoin#25173: test: add coverage for unknown network in -onlynet
055d94d1ab
test: add coverage for unknown network in -onlynet (brunoerg) Pull request description: This PR adds test coverage for the following init error by passing an unknown network in -onlynet0de36941ec/src/init.cpp (L1311)
ACKs for top commit: MarcoFalke: rACK055d94d1ab
Tree-SHA512: 01bbb297afff371f6345889fa04117ff195b68f0bbf934878ba446049791fdbd7d2ce119ee4f9b3616cc0a81330d7055507dc81151acf68532c077f3575258e9
This commit is contained in:
commit
d433f59f1e
@ -36,6 +36,7 @@ addnode connect to a CJDNS address
|
||||
- Test passing invalid -i2psam
|
||||
- Test passing -onlynet=onion without -proxy or -onion
|
||||
- Test passing -onlynet=onion with -onion=0 and with -noonion
|
||||
- Test passing unknown -onlynet
|
||||
"""
|
||||
|
||||
import socket
|
||||
@ -349,6 +350,11 @@ class ProxyTest(BitcoinTestFramework):
|
||||
self.nodes[1].extra_args = ["-onlynet=onion", arg]
|
||||
self.nodes[1].assert_start_raises_init_error(expected_msg=msg)
|
||||
|
||||
self.log.info("Test passing unknown network to -onlynet raises expected init error")
|
||||
self.nodes[1].extra_args = ["-onlynet=abc"]
|
||||
msg = "Error: Unknown network specified in -onlynet: 'abc'"
|
||||
self.nodes[1].assert_start_raises_init_error(expected_msg=msg)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
ProxyTest().main()
|
||||
|
Loading…
Reference in New Issue
Block a user