Skip to content
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

Refactoring and improvements for test setup components #581

Merged
merged 51 commits into from
Mar 26, 2025

Conversation

soareschen
Copy link
Collaborator

@soareschen soareschen commented Mar 21, 2025

Summary

  • Use #[cgp_type] to auto derive implementations such as UseType for traits such as HasChainTypeAt.
  • Use #[cgp_getter] to auto derive implementations such as UseField for traits such as HasChainAt.
  • At generic parameters to component name types for indexed traits. e.g. the component name type for HasChainTypeAt<I> is ChainTypeProviderAtComponent<I>
  • Rename the provider trait and component name types following new CGP conventions. e.g. the provider trait for HasChainTypeAt is ChainTypeProviderAt instead of ProvideChainTypeAt, and the component name type is ChainTypeProviderAtComponent instead of ChainTypeAtComponent.
  • Introduce new hermes-cosmos-chain-preset crate that define a Cosmos chain preset using provider implementations from both hermes-cosmos-chain-components and hermes-cosmos-test-components.
  • Introduce new blanket trait aliases HasBinaryTestDriverFields and CanUseBinaryTestDriverMethods to simplify the constraint specification for generic test cases like TestIbcTransfer.
  • Add generic parameters to generic test cases like TestIbcTransfer, so that they can be tested with either ordering of AxB or BxA.

@soareschen soareschen marked this pull request as ready for review March 25, 2025 12:57
@soareschen soareschen requested a review from ljoss17 March 25, 2025 12:57
Copy link
Contributor

@ljoss17 ljoss17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@soareschen soareschen merged commit 8e9d874 into main Mar 26, 2025
10 checks passed
@soareschen soareschen deleted the soares/test-improvements branch March 26, 2025 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants