diff --git a/test-foundry/prod/aave-v2/TestLens.t.sol b/test-foundry/prod/aave-v2/TestLens.t.sol index b75aad074..fe3df0491 100644 --- a/test-foundry/prod/aave-v2/TestLens.t.sol +++ b/test-foundry/prod/aave-v2/TestLens.t.sol @@ -15,15 +15,12 @@ contract TestLens is TestSetup { uint256 poolBorrowIndex; } - function testUpgradeLens() public { + function testIndexesShouldBeEqualAfterUpgrade() public { Lens lensImplV2 = new Lens(address(morpho)); address[] memory marketsCreated = lens.getAllMarkets(); Vars[] memory expectedValues = new Vars[](marketsCreated.length); - vm.prank(proxyAdmin.owner()); - proxyAdmin.upgrade(lensProxy, address(lensImplV2)); - for (uint256 i; i < marketsCreated.length; ++i) { address market = marketsCreated[i]; if (market == aStEth) continue; @@ -41,6 +38,9 @@ contract TestLens is TestSetup { expectedValues[i].poolBorrowIndex = poolBorrowIndex; } + vm.prank(proxyAdmin.owner()); + proxyAdmin.upgrade(lensProxy, address(lensImplV2)); + for (uint256 i; i < marketsCreated.length; ++i) { address market = marketsCreated[i]; if (market == aStEth) continue;