[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”)
+ (“permission”, “first”)
+ (“parent”, “active”)
+ (“data”, authority(chain.get_public_key(tester_account, “first”)))
+ (“delay”, 0),
+ 30, 7
+ );
+ BOOST_FAIL(“updateauth should have a min delay set by previous updateauth”);
+ } catch (…) { }

Please use BOOST_REQUIRE_EXCEPTION with specific exception predicate.

This post was last modified on April 16, 2018, 3:52 pm