Add son_delete cli tests

This commit is contained in:
Srdjan Obucina 2019-10-15 18:11:12 +02:00
parent 25062a3757
commit b3cb26b207

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()));