brianjohnson5972 commented on this pull request.
> @@ -923,6 +923,16 @@ BOOST_AUTO_TEST_CASE( link_delay_link_change_test ) { try {
liquid_balance = get_currency_balance(chain, N(tester2));
BOOST_REQUIRE_EQUAL(asset::from_string(“0.0000 CUR”), liquid_balance);
+ try {
+ chain.push_action(config::system_account_name, contracts::linkauth::get_name(), tester_account, fc::mutable_variant_object()
+ (“account”, “tester”)
+ (“code”, “currency”)
+ (“type”, “transfer”)
+ (“requirement”, “second”),
+ 30, 3);
+ BOOST_FAIL(“linkauth should have a min delay set by previous linkauth”);
+ } catch (…) { }
Use BOOST_REQUIRE_EXCEPTION (with a predicate that identifies the specific exception content, if needed)
Related
[EOSIO/eos] add testcase for #2195 (security delays) (#2417)brianjohnson5972 commented on this pull request. > @@ -1444,6 +1650,18 @@ BOOST_AUTO_TEST_CASE( canceldelay_test ) { try { liquid_balance = get_currency_balance(chain, N(tester2)); BOOST_REQUIRE_EQUAL(asset::from_string("0.0000 CUR"), liquid_balance); + try { + chain.push_action(config::system_account_name, contracts::updateauth::get_name(), tester_account, fc::mutable_variant_object() + ("account", "tester")…
-
[EOSIO/eos] Test Security Delays (#2195)As these manual (or integration script tests) are performed, also update the [delay unit tests](https://github.com/EOSIO/eos/blob/master/tests/chain_tests/delay_tests.cpp).
[EOSIO/eos] add testcase for #2195 (security delays) (#2417)brianjohnson5972 commented on this pull request. > @@ -923,6 +923,16 @@ BOOST_AUTO_TEST_CASE( link_delay_link_change_test ) { try { liquid_balance = get_currency_balance(chain, N(tester2)); BOOST_REQUIRE_EQUAL(asset::from_string("0.0000 CUR"), liquid_balance); + try { + chain.push_action(config::system_account_name, contracts::linkauth::get_name(), tester_account, fc::mutable_variant_object() + ("account", "tester")…
[EOSIO/eos] add testcase for #2195 (security delays) (#2417)brianjohnson5972 commented on this pull request. > + + liquid_balance = get_currency_balance(chain, N(currency)); + BOOST_REQUIRE_EQUAL(asset::from_string("999900.0000 CUR"), liquid_balance); + liquid_balance = get_currency_balance(chain, N(tester)); + BOOST_REQUIRE_EQUAL(asset::from_string("100.0000 CUR"), liquid_balance); + liquid_balance = get_currency_balance(chain, N(tester2)); + BOOST_REQUIRE_EQUAL(asset::from_string("0.0000 CUR"), liquid_balance);…
This post was last modified on April 16, 2018, 3:53 pm