-
Notifications
You must be signed in to change notification settings - Fork 412
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test(cli): warp commands e2e tests #5121
base: main
Are you sure you want to change the base?
Conversation
…to xeno/warp-commands-e2e-tests
… different flag configs
… different flag combinations
…erent flags combinations
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5121 +/- ##
=======================================
Coverage 77.53% 77.53%
=======================================
Files 103 103
Lines 2110 2110
Branches 190 190
=======================================
Hits 1636 1636
Misses 453 453
Partials 21 21
|
…to xeno/warp-commands-e2e-tests
return `${REGISTRY_PATH}/deployments/warp_routes/${tokenSymbol.toUpperCase()}/${chains.join( | ||
'-', | ||
)}-config.yaml`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the createWarpRouteConfigId
and BaseRegistry.getWarpRoutesPath
functions in the registry package can help you reduce duplication with Registry code here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't reused the BaseRegistry.getWarpRoutesPath
because it is marked as protected. Thanks for the createWarpRouteConfigId
suggestion 🔥
…to xeno/warp-commands-e2e-tests
…to xeno/warp-commands-e2e-tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the new test coverage is great but I think we can significantly dedupe some of the test scaffolding and make the diff here much smaller/more extensible to new token types etc
// Assertions | ||
expect(finalOutput.exitCode).to.equal(0); | ||
const updatedWarpDeployConfig_2 = await readWarpConfig( | ||
CHAIN_NAME_2, | ||
COMBINED_WARP_CORE_CONFIG_PATH, | ||
WARP_DEPLOY_OUTPUT_PATH, | ||
); | ||
|
||
expect(updatedWarpDeployConfig_2[CHAIN_NAME_2].type).to.equal( | ||
TokenType.collateral, | ||
); | ||
expect(updatedWarpDeployConfig_2[CHAIN_NAME_2].decimals).to.equal( | ||
expectedTokenDecimals, | ||
); | ||
expect(updatedWarpDeployConfig_2[CHAIN_NAME_2].symbol).to.equal( | ||
expectedTokenSymbol, | ||
); | ||
expect(updatedWarpDeployConfig_2[CHAIN_NAME_2].mailbox).to.equal( | ||
chain2Addresses.mailbox, | ||
); | ||
|
||
const updatedWarpDeployConfig_3 = await readWarpConfig( | ||
CHAIN_NAME_3, | ||
COMBINED_WARP_CORE_CONFIG_PATH, | ||
WARP_DEPLOY_OUTPUT_PATH, | ||
); | ||
|
||
expect(updatedWarpDeployConfig_3[CHAIN_NAME_3].type).to.equal( | ||
TokenType.synthetic, | ||
); | ||
expect(updatedWarpDeployConfig_3[CHAIN_NAME_3].decimals).to.equal( | ||
expectedTokenDecimals, | ||
); | ||
expect(updatedWarpDeployConfig_3[CHAIN_NAME_3].symbol).to.equal( | ||
expectedTokenSymbol, | ||
); | ||
expect(updatedWarpDeployConfig_3[CHAIN_NAME_3].mailbox).to.equal( | ||
chain3Addresses.mailbox, | ||
); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when I see blocks like this I expect at least a little effort to dedupe/be concise
obviously these are just tests but I think maintainability matters here too
await hyperlaneWarpDeploy(WARP_DEPLOY_OUTPUT_PATH).should.be.rejected; // TODO: revisit this to figure out how to parse the error. | ||
}); | ||
|
||
it(`should be able to bridge between ${TokenType.collateralVaultRebase} and ${TokenType.syntheticRebase}`, async function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you define some sort of 2D matrix of token types and have a single tests logic test all of the combinations?
Description
This PR tries to e2e test multiple use cases with
warp
commands to ensure that future changes that might break or change the commands' behavior are detected early.Drive-by changes
skipConfirmation
propagation in signer strategy codetest/warp
folderRelated issues
Backward compatibility
Testing