fix update_son_votes test
This commit is contained in:
parent
9c89f23327
commit
9f85d7eef9
1 changed files with 110 additions and 115 deletions
|
|
@ -329,7 +329,6 @@ BOOST_FIXTURE_TEST_CASE( select_top_fifteen_sons, cli_fixture )
|
||||||
BOOST_CHECK(generate_block(app1));
|
BOOST_CHECK(generate_block(app1));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// create sonaccount02
|
// create sonaccount02
|
||||||
bki = con.wallet_api_ptr->suggest_brain_key();
|
bki = con.wallet_api_ptr->suggest_brain_key();
|
||||||
BOOST_CHECK(!bki.brain_priv_key.empty());
|
BOOST_CHECK(!bki.brain_priv_key.empty());
|
||||||
|
|
@ -1096,7 +1095,6 @@ BOOST_AUTO_TEST_CASE( list_son )
|
||||||
rejected.push_back("son1account");
|
rejected.push_back("son1account");
|
||||||
update_votes_tx = con.wallet_api_ptr->update_son_votes("nathan", accepted,
|
update_votes_tx = con.wallet_api_ptr->update_son_votes("nathan", accepted,
|
||||||
rejected, 15, true);
|
rejected, 15, true);
|
||||||
BOOST_CHECK(generate_block());
|
|
||||||
BOOST_CHECK(generate_maintenance_block());
|
BOOST_CHECK(generate_maintenance_block());
|
||||||
|
|
||||||
// Verify the votes
|
// Verify the votes
|
||||||
|
|
@ -1117,7 +1115,6 @@ BOOST_AUTO_TEST_CASE( list_son )
|
||||||
BOOST_CHECK_THROW(update_votes_tx = con.wallet_api_ptr->update_son_votes("nathan", accepted,
|
BOOST_CHECK_THROW(update_votes_tx = con.wallet_api_ptr->update_son_votes("nathan", accepted,
|
||||||
rejected, 15, true), fc::exception);
|
rejected, 15, true), fc::exception);
|
||||||
BOOST_CHECK(generate_block());
|
BOOST_CHECK(generate_block());
|
||||||
BOOST_CHECK(generate_maintenance_block());
|
|
||||||
|
|
||||||
// Verify the votes
|
// Verify the votes
|
||||||
son1_obj = con.wallet_api_ptr->get_son("son1account");
|
son1_obj = con.wallet_api_ptr->get_son("son1account");
|
||||||
|
|
@ -1135,13 +1132,12 @@ BOOST_AUTO_TEST_CASE( list_son )
|
||||||
rejected.push_back("son2account");
|
rejected.push_back("son2account");
|
||||||
update_votes_tx = con.wallet_api_ptr->update_son_votes("nathan", accepted,
|
update_votes_tx = con.wallet_api_ptr->update_son_votes("nathan", accepted,
|
||||||
rejected, 15, true);
|
rejected, 15, true);
|
||||||
BOOST_CHECK(generate_block());
|
|
||||||
BOOST_CHECK(generate_maintenance_block());
|
BOOST_CHECK(generate_maintenance_block());
|
||||||
|
|
||||||
// Verify the votes
|
// Verify the votes
|
||||||
son1_obj = con.wallet_api_ptr->get_son("son1account");
|
son1_obj = con.wallet_api_ptr->get_son("son1account");
|
||||||
son1_end_votes = son1_obj.total_votes;
|
son1_end_votes = son1_obj.total_votes;
|
||||||
BOOST_CHECK(son1_end_votes > son1_start_votes);
|
BOOST_CHECK(son1_end_votes == son1_start_votes);
|
||||||
son1_start_votes = son1_end_votes;
|
son1_start_votes = son1_end_votes;
|
||||||
son2_obj = con.wallet_api_ptr->get_son("son2account");
|
son2_obj = con.wallet_api_ptr->get_son("son2account");
|
||||||
son2_end_votes = son2_obj.total_votes;
|
son2_end_votes = son2_obj.total_votes;
|
||||||
|
|
@ -1155,7 +1151,6 @@ BOOST_AUTO_TEST_CASE( list_son )
|
||||||
accepted.push_back("son1accnt");
|
accepted.push_back("son1accnt");
|
||||||
BOOST_REQUIRE_THROW(update_votes_tx = con.wallet_api_ptr->update_son_votes("nathan", accepted,
|
BOOST_REQUIRE_THROW(update_votes_tx = con.wallet_api_ptr->update_son_votes("nathan", accepted,
|
||||||
rejected, 15, true), fc::exception);
|
rejected, 15, true), fc::exception);
|
||||||
BOOST_CHECK(generate_block());
|
|
||||||
BOOST_CHECK(generate_maintenance_block());
|
BOOST_CHECK(generate_maintenance_block());
|
||||||
|
|
||||||
// Verify the votes
|
// Verify the votes
|
||||||
|
|
@ -1167,15 +1162,15 @@ BOOST_AUTO_TEST_CASE( list_son )
|
||||||
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);
|
||||||
son2_start_votes = son2_end_votes;
|
son2_start_votes = son2_end_votes;
|
||||||
|
|
||||||
} 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()));
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
BOOST_TEST_MESSAGE("SON Vote cli wallet tests end");
|
BOOST_TEST_MESSAGE("SON update_son_votes cli wallet tests end");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE( related_functions )
|
BOOST_AUTO_TEST_CASE( related_functions )
|
||||||
{
|
{
|
||||||
BOOST_TEST_MESSAGE("SON-related functions cli wallet tests begin");
|
BOOST_TEST_MESSAGE("SON-related functions cli wallet tests begin");
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue