mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-10-10 11:33:46 +02:00
test: passing -onlynet=onion without -proxy/-onion raises expected init error
This commit is contained in:
@@ -33,6 +33,7 @@ addnode connect to a CJDNS address
|
|||||||
|
|
||||||
- Test passing invalid -proxy
|
- Test passing invalid -proxy
|
||||||
- Test passing invalid -onion
|
- Test passing invalid -onion
|
||||||
|
- Test passing -onlynet=onion without -proxy or -onion
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import socket
|
import socket
|
||||||
@@ -319,6 +320,15 @@ class ProxyTest(BitcoinTestFramework):
|
|||||||
msg = "Error: Invalid -onion address or hostname: 'xyz:abc'"
|
msg = "Error: Invalid -onion address or hostname: 'xyz:abc'"
|
||||||
self.nodes[1].assert_start_raises_init_error(expected_msg=msg)
|
self.nodes[1].assert_start_raises_init_error(expected_msg=msg)
|
||||||
|
|
||||||
|
msg = (
|
||||||
|
"Error: Outbound connections restricted to Tor (-onlynet=onion) but "
|
||||||
|
"the proxy for reaching the Tor network is not provided (no -proxy= "
|
||||||
|
"and no -onion= given) or it is explicitly forbidden (-onion=0)"
|
||||||
|
)
|
||||||
|
self.log.info("Test passing -onlynet=onion without -proxy or -onion raises expected init error")
|
||||||
|
self.nodes[1].extra_args = ["-onlynet=onion"]
|
||||||
|
self.nodes[1].assert_start_raises_init_error(expected_msg=msg)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
ProxyTest().main()
|
ProxyTest().main()
|
||||||
|
Reference in New Issue
Block a user