Compare commits
2 commits
master
...
unit_test_
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2920ac97ff | ||
|
|
3db4bf2c74 |
3 changed files with 12 additions and 4 deletions
|
|
@ -59,6 +59,7 @@ BOOST_AUTO_TEST_CASE( two_node_network )
|
||||||
app1.register_plugin<graphene::account_history::account_history_plugin>();
|
app1.register_plugin<graphene::account_history::account_history_plugin>();
|
||||||
boost::program_options::variables_map cfg;
|
boost::program_options::variables_map cfg;
|
||||||
cfg.emplace("p2p-endpoint", boost::program_options::variable_value(string("127.0.0.1:0"), false));
|
cfg.emplace("p2p-endpoint", boost::program_options::variable_value(string("127.0.0.1:0"), false));
|
||||||
|
cfg.emplace("plugins", boost::program_options::variable_value(string(" "), false));
|
||||||
app1.initialize(app_dir.path(), cfg);
|
app1.initialize(app_dir.path(), cfg);
|
||||||
cfg.emplace("genesis-json", boost::program_options::variable_value(create_genesis_file(app_dir), false));
|
cfg.emplace("genesis-json", boost::program_options::variable_value(create_genesis_file(app_dir), false));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,7 @@ database_fixture::database_fixture()
|
||||||
std::cout << "running test " << boost::unit_test::framework::current_test_case().p_name << std::endl;
|
std::cout << "running test " << boost::unit_test::framework::current_test_case().p_name << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto ahplugin = app.register_plugin<graphene::account_history::account_history_plugin>();
|
//auto ahplugin = app.register_plugin<graphene::account_history::account_history_plugin>();
|
||||||
auto mhplugin = app.register_plugin<graphene::market_history::market_history_plugin>();
|
auto mhplugin = app.register_plugin<graphene::market_history::market_history_plugin>();
|
||||||
auto bookieplugin = app.register_plugin<graphene::bookie::bookie_plugin>();
|
auto bookieplugin = app.register_plugin<graphene::bookie::bookie_plugin>();
|
||||||
auto affiliateplugin = app.register_plugin<graphene::affiliate_stats::affiliate_stats_plugin>();
|
auto affiliateplugin = app.register_plugin<graphene::affiliate_stats::affiliate_stats_plugin>();
|
||||||
|
|
|
||||||
|
|
@ -745,6 +745,8 @@ BOOST_FIXTURE_TEST_CASE( maintenance_interval, database_fixture )
|
||||||
PUSH_TX( db, trx, ~0 );
|
PUSH_TX( db, trx, ~0 );
|
||||||
trx.operations.clear();
|
trx.operations.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
generate_block();
|
||||||
transfer(account_id_type()(db), nathan, asset(5000));
|
transfer(account_id_type()(db), nathan, asset(5000));
|
||||||
|
|
||||||
generate_blocks(maintenence_time - initial_properties.parameters.block_interval);
|
generate_blocks(maintenence_time - initial_properties.parameters.block_interval);
|
||||||
|
|
@ -959,18 +961,23 @@ BOOST_FIXTURE_TEST_CASE( pop_block_twice, database_fixture )
|
||||||
processed_transaction ptx;
|
processed_transaction ptx;
|
||||||
|
|
||||||
account_object committee_account_object = committee_account(db);
|
account_object committee_account_object = committee_account(db);
|
||||||
|
generate_block(skip_flags);
|
||||||
// transfer from committee account to Sam account
|
// transfer from committee account to Sam account
|
||||||
transfer(committee_account_object, sam_account_object, core.amount(100000));
|
transfer(committee_account_object, sam_account_object, core.amount(100000));
|
||||||
|
|
||||||
generate_block(skip_flags);
|
generate_block(skip_flags);
|
||||||
|
|
||||||
create_account("alice");
|
private_key_type charlie_key = generate_private_key("charlie");
|
||||||
|
create_account("charlie", charlie_key);
|
||||||
generate_block(skip_flags);
|
generate_block(skip_flags);
|
||||||
create_account("bob");
|
|
||||||
generate_block(skip_flags);
|
generate_block(skip_flags);
|
||||||
|
private_key_type bob_key = generate_private_key("bob");
|
||||||
|
create_account("bob", bob_key);
|
||||||
|
generate_block(skip_flags);
|
||||||
|
|
||||||
db.pop_block();
|
db.pop_block();
|
||||||
db.pop_block();
|
db.pop_block();
|
||||||
|
|
||||||
} catch(const fc::exception& e) {
|
} catch(const fc::exception& e) {
|
||||||
edump( (e.to_detail_string()) );
|
edump( (e.to_detail_string()) );
|
||||||
throw;
|
throw;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue