@@ -11,6 +11,7 @@ import {ExtendedAggregatorV2V3Interface} from './interfaces/ExtendedAggregatorV2
1111import {CommonTestBase, ReserveTokens} from './CommonTestBase.sol ' ;
1212import {ProxyHelpers} from './ProxyHelpers.sol ' ;
1313import {ChainIds} from './ChainIds.sol ' ;
14+ import {GovV3Helpers} from './GovV3Helpers.sol ' ;
1415
1516struct ReserveConfig {
1617 string symbol;
@@ -49,6 +50,30 @@ struct InterestStrategyValues {
4950contract ProtocolV2TestBase is CommonTestBase {
5051 using SafeERC20 for IERC20 ;
5152
53+ /**
54+ * @dev runs the default test suite that should run on any proposal touching the aave protocol which includes:
55+ * - diffing the config
56+ * - running an e2e testsuite over all assets
57+ */
58+ function defaultTest (
59+ string memory reportName ,
60+ ILendingPool pool ,
61+ address payload
62+ ) public returns (ReserveConfig[] memory , ReserveConfig[] memory ) {
63+ string memory beforeString = string (abi.encodePacked (reportName, '_before ' ));
64+ ReserveConfig[] memory configBefore = createConfigurationSnapshot (beforeString, pool);
65+
66+ GovV3Helpers.executePayload (vm, payload);
67+
68+ string memory afterString = string (abi.encodePacked (reportName, '_after ' ));
69+ ReserveConfig[] memory configAfter = createConfigurationSnapshot (afterString, pool);
70+
71+ diffReports (beforeString, afterString);
72+
73+ e2eTest (pool);
74+ return (configBefore, configAfter);
75+ }
76+
5277 /**
5378 * @dev Generates a markdown compatible snapshot of the whole pool configuration into `/reports`.
5479 * @param reportName filename suffix for the generated reports.
0 commit comments