Skip to content

Commit

Permalink
test: verbose error msg
Browse files Browse the repository at this point in the history
  • Loading branch information
DhairyaSethi committed Jan 3, 2025
1 parent b06cb8e commit e7c651e
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {IGhoToken} from 'src/interfaces/IGhoToken.sol';
import {IGhoOracle} from 'src/interfaces/IGhoOracle.sol';

import {ReserveConfiguration} from 'aave-v3-origin/contracts/protocol/libraries/configuration/ReserveConfiguration.sol';
import {Errors} from 'aave-address-book/governance-v3/Errors.sol';
import {ProtocolV3TestBase} from 'aave-helpers/src/ProtocolV3TestBase.sol';
import {GovV3Helpers} from 'aave-helpers/src/GovV3Helpers.sol';
import {AaveV3Base} from 'aave-address-book/AaveV3Base.sol';
Expand Down Expand Up @@ -106,15 +107,15 @@ contract AaveV3Base_GHOBaseListing_20241223_ListingPreRequisites is
}

function test_listingFailsPreLaunch() public {
vm.expectRevert(abi.encodePacked('29')); // gho token not deployed, reverts on token.decimals() check
vm.expectRevert(bytes(Errors.FAILED_ACTION_EXECUTION)); // gho token not deployed, reverts on token.decimals() check
GovernanceV3Base.PAYLOADS_CONTROLLER.executePayload(payloadId);
}

function test_listingFailsWithoutSeedAmount() public {
test_listingFailsPreLaunch();
_executeLaunchAIP(); // deploys gho token, token pool & stewards

vm.expectRevert(abi.encodePacked('29')); // seed amount has not been bridged yet, reverts on pool.supply()
vm.expectRevert(bytes(Errors.FAILED_ACTION_EXECUTION)); // seed amount has not been bridged yet, reverts on pool.supply()
GovernanceV3Base.PAYLOADS_CONTROLLER.executePayload(payloadId);
}

Expand Down

0 comments on commit e7c651e

Please sign in to comment.