aboutsummaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
authorbrunoerg <brunoely.gc@gmail.com>2022-05-19 10:42:56 -0300
committerbrunoerg <brunoely.gc@gmail.com>2022-05-19 18:39:23 -0300
commit055d94d1ab4937ed0080459fbe63568dc47b6786 (patch)
tree413de2cb34bf785c23f6cc3cb9e3cb5f8e45097c /test/functional
parent7b3343f3009d38abe2de10e9fdc7f702d6a2cf1b (diff)
test: add coverage for unknown network in -onlynet
Diffstat (limited to 'test/functional')
-rwxr-xr-xtest/functional/feature_proxy.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/functional/feature_proxy.py b/test/functional/feature_proxy.py
index 8541c3ed88..50e0e2c4cc 100755
--- a/test/functional/feature_proxy.py
+++ b/test/functional/feature_proxy.py
@@ -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()