Skip to content

Commit 055d94d

Browse files
committed
test: add coverage for unknown network in -onlynet
1 parent 7b3343f commit 055d94d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/functional/feature_proxy.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
- Test passing invalid -i2psam
3737
- Test passing -onlynet=onion without -proxy or -onion
3838
- Test passing -onlynet=onion with -onion=0 and with -noonion
39+
- Test passing unknown -onlynet
3940
"""
4041

4142
import socket
@@ -349,6 +350,11 @@ def networks_dict(d):
349350
self.nodes[1].extra_args = ["-onlynet=onion", arg]
350351
self.nodes[1].assert_start_raises_init_error(expected_msg=msg)
351352

353+
self.log.info("Test passing unknown network to -onlynet raises expected init error")
354+
self.nodes[1].extra_args = ["-onlynet=abc"]
355+
msg = "Error: Unknown network specified in -onlynet: 'abc'"
356+
self.nodes[1].assert_start_raises_init_error(expected_msg=msg)
357+
352358

353359
if __name__ == '__main__':
354360
ProxyTest().main()

0 commit comments

Comments
 (0)