File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change 1+ #!/usr/bin/env python3
2+ # Copyright (c) 2017 The Bitcoin Core developers
3+ # Distributed under the MIT software license, see the accompanying
4+ # file COPYING or http://www.opensource.org/licenses/mit-license.php.
5+ """Test bitcoin-cli"""
6+ from test_framework .test_framework import BitcoinTestFramework
7+ from test_framework .util import assert_equal
8+
9+ class TestBitcoinCli (BitcoinTestFramework ):
10+
11+ def __init__ (self ):
12+ super ().__init__ ()
13+ self .setup_clean_chain = True
14+ self .num_nodes = 1
15+
16+ def run_test (self ):
17+ """Main test logic"""
18+
19+ self .log .info ("Compare responses from getinfo RPC and `bitcoin-cli getinfo`" )
20+ cli_get_info = self .nodes [0 ].cli .getinfo ()
21+ rpc_get_info = self .nodes [0 ].getinfo ()
22+
23+ assert_equal (cli_get_info , rpc_get_info )
24+
25+ if __name__ == '__main__' :
26+ TestBitcoinCli ().main ()
Original file line number Diff line number Diff line change 8181 # vv Tests less than 30s vv
8282 'keypool-topup.py' ,
8383 'zmq_test.py' ,
84+ 'bitcoin_cli.py' ,
8485 'mempool_resurrect_test.py' ,
8586 'txn_doublespend.py --mineblock' ,
8687 'txn_clone.py' ,
You can’t perform that action at this time.
0 commit comments