From 58a14795b89a6bd812e0b71cb8b3088b8ab55c11 Mon Sep 17 00:00:00 2001 From: Jon Atack Date: Tue, 1 Mar 2022 22:49:02 +0100 Subject: [PATCH] test: passing -onlynet=onion with -onion=0/-noonion raises expected init error --- test/functional/feature_proxy.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/functional/feature_proxy.py b/test/functional/feature_proxy.py index d23733c5d38..14308b3fd15 100755 --- a/test/functional/feature_proxy.py +++ b/test/functional/feature_proxy.py @@ -34,6 +34,7 @@ addnode connect to a CJDNS address - Test passing invalid -proxy - Test passing invalid -onion - Test passing -onlynet=onion without -proxy or -onion +- Test passing -onlynet=onion with -onion=0 and with -noonion """ import socket @@ -329,6 +330,11 @@ class ProxyTest(BitcoinTestFramework): self.nodes[1].extra_args = ["-onlynet=onion"] self.nodes[1].assert_start_raises_init_error(expected_msg=msg) + self.log.info("Test passing -onlynet=onion with -onion=0/-noonion raises expected init error") + for arg in ["-onion=0", "-noonion"]: + self.nodes[1].extra_args = ["-onlynet=onion", arg] + self.nodes[1].assert_start_raises_init_error(expected_msg=msg) + if __name__ == '__main__': ProxyTest().main()