diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2020-07-18 11:00:30 +0300 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2020-07-22 22:55:48 +0300 |
commit | 2aac093a3d60e446b85eebdf170ea6bed77bec92 (patch) | |
tree | 17e0a7a5eb866794aae13f50f3c4c9d580354bf0 /test/functional/rpc_net.py | |
parent | 3c58129b1293742a49aa196cb210ff345a7339e6 (diff) |
test: Add test coverage for -networkactive option
Diffstat (limited to 'test/functional/rpc_net.py')
-rwxr-xr-x | test/functional/rpc_net.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/functional/rpc_net.py b/test/functional/rpc_net.py index ca26152e7e..3336246c8b 100755 --- a/test/functional/rpc_net.py +++ b/test/functional/rpc_net.py @@ -102,12 +102,14 @@ class NetTest(BitcoinTestFramework): assert_equal(self.nodes[0].getnetworkinfo()['networkactive'], True) assert_equal(self.nodes[0].getnetworkinfo()['connections'], 2) - self.nodes[0].setnetworkactive(state=False) + with self.nodes[0].assert_debug_log(expected_msgs=['SetNetworkActive: false\n']): + self.nodes[0].setnetworkactive(state=False) assert_equal(self.nodes[0].getnetworkinfo()['networkactive'], False) # Wait a bit for all sockets to close wait_until(lambda: self.nodes[0].getnetworkinfo()['connections'] == 0, timeout=3) - self.nodes[0].setnetworkactive(state=True) + with self.nodes[0].assert_debug_log(expected_msgs=['SetNetworkActive: true\n']): + self.nodes[0].setnetworkactive(state=True) self.log.info('Connect nodes both way') connect_nodes(self.nodes[0], 1) connect_nodes(self.nodes[1], 0) |