From 2bfebbcbf06970b5a10b1b153a8c87de8b7819c4 Mon Sep 17 00:00:00 2001 From: MathisGD Date: Thu, 7 Mar 2024 11:16:46 +0100 Subject: [PATCH] test: enforce chain id is 1 --- test/MorphoChainlinkOracleV2FactoryTest.sol | 1 + test/MorphoChainlinkOracleV2Test.sol | 1 + test/WstEthStEthExchangeRateChainlinkAdapterTest.sol | 1 + 3 files changed, 3 insertions(+) diff --git a/test/MorphoChainlinkOracleV2FactoryTest.sol b/test/MorphoChainlinkOracleV2FactoryTest.sol index 2bf6f47..ee7e89c 100644 --- a/test/MorphoChainlinkOracleV2FactoryTest.sol +++ b/test/MorphoChainlinkOracleV2FactoryTest.sol @@ -13,6 +13,7 @@ contract ChainlinkOracleFactoryTest is Test { function setUp() public { vm.createSelectFork(vm.envString("ETH_RPC_URL")); + require(block.chainid == 1, "chain isn't Ethereum"); factory = new MorphoChainlinkOracleV2Factory(); } diff --git a/test/MorphoChainlinkOracleV2Test.sol b/test/MorphoChainlinkOracleV2Test.sol index e8cda84..989e6d1 100644 --- a/test/MorphoChainlinkOracleV2Test.sol +++ b/test/MorphoChainlinkOracleV2Test.sol @@ -11,6 +11,7 @@ contract MorphoChainlinkOracleV2Test is Test { function setUp() public { vm.createSelectFork(vm.envString("ETH_RPC_URL")); + require(block.chainid == 1, "chain isn't Ethereum"); } function testOracleWbtcUsdc() public { diff --git a/test/WstEthStEthExchangeRateChainlinkAdapterTest.sol b/test/WstEthStEthExchangeRateChainlinkAdapterTest.sol index 499c354..a2e43cb 100644 --- a/test/WstEthStEthExchangeRateChainlinkAdapterTest.sol +++ b/test/WstEthStEthExchangeRateChainlinkAdapterTest.sol @@ -14,6 +14,7 @@ contract WstEthStEthExchangeRateChainlinkAdapterTest is Test { function setUp() public { vm.createSelectFork(vm.envString("ETH_RPC_URL")); + require(block.chainid == 1, "chain isn't Ethereum"); adapter = new WstEthStEthExchangeRateChainlinkAdapter(); morphoOracle = new MorphoChainlinkOracleV2( vaultZero, 1, AggregatorV3Interface(address(adapter)), feedZero, 18, vaultZero, 1, feedZero, feedZero, 18