tests: add a BasicTestingSetup and apply to all tests
Make sure that chainparams and logging is properly initialized. Doing this for every test may be overkill, but this initialization is so simple that that does not matter. This should fix the travis issues.
This commit is contained in:
@@ -6,7 +6,19 @@
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <boost/thread.hpp>
|
||||
|
||||
struct TestingSetup {
|
||||
/** Basic testing setup.
|
||||
* This just configures logging and chain parameters.
|
||||
*/
|
||||
struct BasicTestingSetup {
|
||||
BasicTestingSetup();
|
||||
~BasicTestingSetup();
|
||||
};
|
||||
|
||||
/** Testing setup that configures a complete environment.
|
||||
* Included are data directory, coins database, script check threads
|
||||
* and wallet (if enabled) setup.
|
||||
*/
|
||||
struct TestingSetup: public BasicTestingSetup {
|
||||
CCoinsViewDB *pcoinsdbview;
|
||||
boost::filesystem::path pathTemp;
|
||||
boost::thread_group threadGroup;
|
||||
|
||||
Reference in New Issue
Block a user