From ca8a9edac62a056c14fdc7f793c633445d5339e5 Mon Sep 17 00:00:00 2001 From: Adrien Husson Date: Sun, 27 Oct 2024 21:23:19 +0100 Subject: [PATCH 1/2] test: run StEth fork test by default --- test/forge/fork/StEthBundlerForkTest.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/forge/fork/StEthBundlerForkTest.sol b/test/forge/fork/StEthBundlerForkTest.sol index 44415bfe..da0ebdb7 100644 --- a/test/forge/fork/StEthBundlerForkTest.sol +++ b/test/forge/fork/StEthBundlerForkTest.sol @@ -17,10 +17,10 @@ contract EthereumStEthBundlerForkTest is ForkTest { using SafeTransferLib for ERC20; function setUp() public override { - if (block.chainid != 1) return; - super.setUp(); + if (block.chainid != 1) return; + bundler = new EthereumStEthBundlerMock(); } From ec4c6714129563fced5b56c554550879450f654d Mon Sep 17 00:00:00 2001 From: Adrien Husson Date: Mon, 28 Oct 2024 15:32:32 +0100 Subject: [PATCH 2/2] refactor: normalize running on chain 1 by default --- test/forge/fork/migration/AaveV2MigrationBundlerForkTest.sol | 4 ++-- .../CompoundV2EthBorrowableMigrationBundlerForkTest.sol | 4 ++-- .../CompoundV2EthCollateralMigrationBundlerForkTest.sol | 4 ++-- .../migration/CompoundV2NoEthMigrationBundlerForkTest.sol | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/test/forge/fork/migration/AaveV2MigrationBundlerForkTest.sol b/test/forge/fork/migration/AaveV2MigrationBundlerForkTest.sol index a2467beb..74b9a32d 100644 --- a/test/forge/fork/migration/AaveV2MigrationBundlerForkTest.sol +++ b/test/forge/fork/migration/AaveV2MigrationBundlerForkTest.sol @@ -21,10 +21,10 @@ contract AaveV2MigrationBundlerForkTest is MigrationForkTest { uint256 borrowed = 1 ether; function setUp() public override { - if (block.chainid != 1) return; - super.setUp(); + if (block.chainid != 1) return; + _initMarket(DAI, WETH); vm.label(AAVE_V2_POOL, "Aave V2 Pool"); diff --git a/test/forge/fork/migration/CompoundV2EthBorrowableMigrationBundlerForkTest.sol b/test/forge/fork/migration/CompoundV2EthBorrowableMigrationBundlerForkTest.sol index 956d777e..7879c925 100644 --- a/test/forge/fork/migration/CompoundV2EthBorrowableMigrationBundlerForkTest.sol +++ b/test/forge/fork/migration/CompoundV2EthBorrowableMigrationBundlerForkTest.sol @@ -17,10 +17,10 @@ contract CompoundV2EthLoanMigrationBundlerForkTest is MigrationForkTest { address[] internal enteredMarkets; function setUp() public override { - if (block.chainid != 1) return; - super.setUp(); + if (block.chainid != 1) return; + _initMarket(DAI, WETH); bundler = new CompoundV2MigrationBundlerV2(address(morpho), WETH, C_ETH_V2); diff --git a/test/forge/fork/migration/CompoundV2EthCollateralMigrationBundlerForkTest.sol b/test/forge/fork/migration/CompoundV2EthCollateralMigrationBundlerForkTest.sol index e4c08e98..da205549 100644 --- a/test/forge/fork/migration/CompoundV2EthCollateralMigrationBundlerForkTest.sol +++ b/test/forge/fork/migration/CompoundV2EthCollateralMigrationBundlerForkTest.sol @@ -17,10 +17,10 @@ contract CompoundV2EthCollateralMigrationBundlerForkTest is MigrationForkTest { address[] internal enteredMarkets; function setUp() public override { - if (block.chainid != 1) return; - super.setUp(); + if (block.chainid != 1) return; + _initMarket(WETH, DAI); bundler = new CompoundV2MigrationBundlerV2(address(morpho), WETH, C_ETH_V2); diff --git a/test/forge/fork/migration/CompoundV2NoEthMigrationBundlerForkTest.sol b/test/forge/fork/migration/CompoundV2NoEthMigrationBundlerForkTest.sol index 6c2aada0..f5e24bd5 100644 --- a/test/forge/fork/migration/CompoundV2NoEthMigrationBundlerForkTest.sol +++ b/test/forge/fork/migration/CompoundV2NoEthMigrationBundlerForkTest.sol @@ -17,10 +17,10 @@ contract CompoundV2NoEthMigrationBundlerForkTest is MigrationForkTest { address[] internal enteredMarkets; function setUp() public override { - if (block.chainid != 1) return; - super.setUp(); + if (block.chainid != 1) return; + _initMarket(DAI, USDC); bundler = new CompoundV2MigrationBundlerV2(address(morpho), WETH, C_ETH_V2);