diff options
author | MarcoFalke <falke.marco@gmail.com> | 2022-03-28 09:07:19 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2022-03-28 09:07:22 +0200 |
commit | 161dd7e8641a81097f3b0c8fb6ba82941c9bb387 (patch) | |
tree | 5f0d52de9d9745fb3f4504e98fb22a54643db5a9 /test/functional/feature_proxy.py | |
parent | dc0ba8ce9f6cca3688853882c1a5c607db2c070b (diff) | |
parent | 45e67b2695852c94d5da3f9b82f2b567cbbd2cc3 (diff) | |
download | bitcoin-161dd7e8641a81097f3b0c8fb6ba82941c9bb387.tar.xz |
Merge bitcoin/bitcoin#24687: test: Check an invalid -i2psam will raise an init error
45e67b2695852c94d5da3f9b82f2b567cbbd2cc3 test: invalid -i2psam will raise an init error (brunoerg)
Pull request description:
This PR adds test coverage (at `feature_proxy.py`) for the following init error:
https://github.com/bitcoin/bitcoin/blob/2f0f056e08cd5a1435120592a9ecd212fcdb915b/src/init.cpp#L1791
It starts the node with an invalid -i2psam (`-i2psam=invalidhere`) and test if it raises an error when initializing.
ACKs for top commit:
dunxen:
Code review ACK 45e67b2
Tree-SHA512: b24e3f6e7a9316b9ebc0b6c8bcf1315faff60a9e258d7bb3dbeb9f6695a728bb3083aea2f81114072fe13822bfca34d4a0f44f229825f7c97a81619d810010c0
Diffstat (limited to 'test/functional/feature_proxy.py')
-rwxr-xr-x | test/functional/feature_proxy.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/functional/feature_proxy.py b/test/functional/feature_proxy.py index ba60a9e56f..8541c3ed88 100755 --- a/test/functional/feature_proxy.py +++ b/test/functional/feature_proxy.py @@ -33,6 +33,7 @@ addnode connect to a CJDNS address - Test passing invalid -proxy - Test passing invalid -onion +- Test passing invalid -i2psam - Test passing -onlynet=onion without -proxy or -onion - Test passing -onlynet=onion with -onion=0 and with -noonion """ @@ -329,6 +330,11 @@ class ProxyTest(BitcoinTestFramework): msg = "Error: Invalid -onion address or hostname: 'xyz:abc'" self.nodes[1].assert_start_raises_init_error(expected_msg=msg) + self.log.info("Test passing invalid -i2psam raises expected init error") + self.nodes[1].extra_args = ["-i2psam=def:xyz"] + msg = "Error: Invalid -i2psam address or hostname: 'def:xyz'" + 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= " |