Add son_delete cli tests
This commit is contained in:
parent
25062a3757
commit
b3cb26b207
1 changed files with 11 additions and 0 deletions
|
|
@ -460,6 +460,7 @@ BOOST_FIXTURE_TEST_CASE( create_son, cli_fixture )
|
||||||
signed_transaction create_tx;
|
signed_transaction create_tx;
|
||||||
signed_transaction transfer_tx;
|
signed_transaction transfer_tx;
|
||||||
signed_transaction upgrade_tx;
|
signed_transaction upgrade_tx;
|
||||||
|
signed_transaction delete_tx;
|
||||||
account_object son1_before_upgrade, son1_after_upgrade;
|
account_object son1_before_upgrade, son1_after_upgrade;
|
||||||
account_object son2_before_upgrade, son2_after_upgrade;
|
account_object son2_before_upgrade, son2_after_upgrade;
|
||||||
son_object son1_obj;
|
son_object son1_obj;
|
||||||
|
|
@ -605,6 +606,16 @@ BOOST_FIXTURE_TEST_CASE( create_son, cli_fixture )
|
||||||
son2_end_votes = son2_obj.total_votes;
|
son2_end_votes = son2_obj.total_votes;
|
||||||
BOOST_CHECK(son2_end_votes == son2_start_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 ) {
|
} catch( fc::exception& e ) {
|
||||||
BOOST_TEST_MESSAGE("SON cli wallet tests exception");
|
BOOST_TEST_MESSAGE("SON cli wallet tests exception");
|
||||||
edump((e.to_detail_string()));
|
edump((e.to_detail_string()));
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue