Compare commits

...

3 commits

Author SHA1 Message Date
Srdjan Obucina
b3cb26b207 Add son_delete cli tests 2019-10-15 18:11:12 +02:00
Srdjan Obucina
25062a3757 Merge branch 'feature/SON-115' of https://github.com/peerplays-network/peerplays into feature/SON-115 2019-10-15 18:10:40 +02:00
Srdjan Obucina
089614ee1e Fix segfault when using delete_son from cli_wallet 2019-10-15 00:36:19 +02:00

View file

@ -460,6 +460,7 @@ BOOST_FIXTURE_TEST_CASE( create_son, cli_fixture )
signed_transaction create_tx;
signed_transaction transfer_tx;
signed_transaction upgrade_tx;
signed_transaction delete_tx;
account_object son1_before_upgrade, son1_after_upgrade;
account_object son2_before_upgrade, son2_after_upgrade;
son_object son1_obj;
@ -605,6 +606,16 @@ BOOST_FIXTURE_TEST_CASE( create_son, cli_fixture )
son2_end_votes = son2_obj.total_votes;
BOOST_CHECK(son2_end_votes == son2_start_votes);
BOOST_TEST_MESSAGE("Deleting SONs");
auto _db = app1->chain_database();
BOOST_CHECK(_db->get_index_type<son_index>().indices().size() == 2);
delete_tx = con.wallet_api_ptr->delete_son("son1account", "true");
delete_tx = con.wallet_api_ptr->delete_son("son2account", "true");
BOOST_CHECK(generate_maintenance_block(app1));
BOOST_CHECK(_db->get_index_type<son_index>().indices().size() == 0);
} catch( fc::exception& e ) {
BOOST_TEST_MESSAGE("SON cli wallet tests exception");
edump((e.to_detail_string()));