@@ -25,11 +25,8 @@ def run_test(self):
25
25
"""Main test logic"""
26
26
self .nodes [0 ].generate (BLOCKS )
27
27
28
- cli_response = self .nodes [0 ].cli ("-version" ).send_cli ()
29
- assert "{} RPC client version" .format (self .config ['environment' ]['PACKAGE_NAME' ]) in cli_response
30
-
31
- self .log .info ("Compare responses from getwalletinfo RPC and `bitcoin-cli getwalletinfo`" )
32
28
if self .is_wallet_compiled ():
29
+ self .log .info ("Compare responses from getwalletinfo RPC and `bitcoin-cli getwalletinfo`" )
33
30
cli_response = self .nodes [0 ].cli .getwalletinfo ()
34
31
rpc_response = self .nodes [0 ].getwalletinfo ()
35
32
assert_equal (cli_response , rpc_response )
@@ -55,10 +52,10 @@ def run_test(self):
55
52
self .log .info ("Test connecting with non-existing RPC cookie file" )
56
53
assert_raises_process_error (1 , "Could not locate RPC credentials" , self .nodes [0 ].cli ('-rpccookiefile=does-not-exist' , '-rpcpassword=' ).echo )
57
54
58
- self .log .info ("Make sure that -getinfo with arguments fails" )
55
+ self .log .info ("Test -getinfo with arguments fails" )
59
56
assert_raises_process_error (1 , "-getinfo takes no arguments" , self .nodes [0 ].cli ('-getinfo' ).help )
60
57
61
- self .log .info ("Test that -getinfo returns the expected network and blockchain info" )
58
+ self .log .info ("Test -getinfo returns expected network and blockchain info" )
62
59
cli_get_info = self .nodes [0 ].cli ('-getinfo' ).send_cli ()
63
60
network_info = self .nodes [0 ].getnetworkinfo ()
64
61
blockchain_info = self .nodes [0 ].getblockchaininfo ()
@@ -72,7 +69,7 @@ def run_test(self):
72
69
assert_equal (cli_get_info ['chain' ], blockchain_info ['chain' ])
73
70
74
71
if self .is_wallet_compiled ():
75
- self .log .info ("Test that -getinfo returns the expected wallet info" )
72
+ self .log .info ("Test -getinfo returns expected wallet info" )
76
73
assert_equal (cli_get_info ['balance' ], BALANCE )
77
74
wallet_info = self .nodes [0 ].getwalletinfo ()
78
75
assert_equal (cli_get_info ['keypoolsize' ], wallet_info ['keypoolsize' ])
@@ -84,6 +81,10 @@ def run_test(self):
84
81
85
82
self .stop_node (0 )
86
83
84
+ self .log .info ("Test -version with node stopped" )
85
+ cli_response = self .nodes [0 ].cli ("-version" ).send_cli ()
86
+ assert "{} RPC client version" .format (self .config ['environment' ]['PACKAGE_NAME' ]) in cli_response
87
+
87
88
self .log .info ("Test -rpcwait option waits for RPC connection instead of failing" )
88
89
# Start node without RPC connection.
89
90
self .nodes [0 ].start ()
0 commit comments