6 Commits

Author SHA1 Message Date
MarcoFalke
eeb24a3a01 [qa] TestNode: Add wait_until_stopped helper method
Github-Pull: #11067
Rebased-From: faa8d9581affde35a8242c63fca8a52004d4f943
2017-10-03 18:53:35 +02:00
John Newbery
801d2ae924 [tests] don't override __init__() in individual tests
Almost all test scripts currently need to override the __init__()
method. When they do that they need to call into super().__init__() as
the base class does some generic initialization.

This commit makes the base class __init__() call into set_test_params()
method. Individual test cases can override set_test_params() to setup
their test parameters.

Github-Pull: #11121
Rebased-From: 5448a1471d6fc638a2220ea5a2f3782172efe14c
2017-10-03 18:43:43 +02:00
John Newbery
4d3ba18386 [tests] TestNode: separate add_node from start_node
Separates the act of creating a TestNode object from starting the node.
The test_framework now keeps track of its list of TestNodes, and test
writers can call start_node() and stop_node() without having to update
the self.nodes list.

Github-Pull: #11121
Rebased-From: 36b626867087e9fae6d85f926248997ebff327b7
2017-10-03 18:43:15 +02:00
John Newbery
fc2aa09cf3 [tests] Introduce TestNode
TestNode is a class responsible for all state related to a bitcoind node
under test. It stores local state, is responsible for tracking the
bitcoind process and delegates unrecognised messages to the RPC
connection.

This commit changes start_nodes and stop_nodes to start and stop the
bitcoind nodes in parallel, making test setup and teardown much faster.

Github-Pull: #10711
Rebased-From: 7897338918dac072e788b8ab2919d4559f311bef
2017-10-03 18:18:17 +02:00
John Newbery
cad967a892 [tests] Move stop_node and start_node methods to BitcoinTestFramework
This commit moves functions start_node, start_nodes, stop_node and
stop_nodes functions into the BitcoinTestFramework class. It also moves
the bitcoind_processes dict and coverage variables into BitcoinTestFramework.
2017-06-29 11:55:19 +01:00
Andrew Chow
ec98b78e1e Tests for wallet encryption stuff
Added a functional test which tests the encryptwallet, walletpassphrase, walletpassphrasechange, and walletlock RPCs
2017-06-08 11:07:11 -07:00