Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: standarize testing for dai and mkr actions [PoC] #376

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/DssSpell.t.base.sol
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import "./test/rates.sol";
import "./test/addresses_mainnet.sol";
import "./test/addresses_deployers.sol";
import "./test/addresses_wallets.sol";
import "./test/actions.sol";
import "./test/config.sol";

import {DssSpell} from "./DssSpell.sol";
Expand Down Expand Up @@ -156,7 +157,7 @@ interface FlapperMomAbstract {
function stop() external;
}

contract DssSpellTestBase is Config, DssTest {
contract DssSpellTestBase is Config, Actions, DssTest {
Rates rates = new Rates();
Addresses addr = new Addresses();
Deployers deployers = new Deployers();
Expand Down Expand Up @@ -271,6 +272,11 @@ contract DssSpellTestBase is Config, DssTest {
return string(bytesArray);
}

function _skipTest(bool _skip) internal {
(bool success, ) = address(vm).call(abi.encodeWithSignature("skip(bool)", _skip));
success;
}

// 10^-5 (tenth of a basis point) as a RAY
uint256 TOLERANCE = 10 ** 22;

Expand Down Expand Up @@ -328,6 +334,7 @@ contract DssSpellTestBase is Config, DssTest {
// even if mainnet has already scheduled/cast the spell
vm.makePersistent(address(rates));
vm.makePersistent(address(addr));
vm.makePersistent(address(wallets));
vm.makePersistent(address(deployers));
vm.rollFork(spellValues.deployed_spell_block);

Expand Down
Loading