-
Notifications
You must be signed in to change notification settings - Fork 11.3k
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(rpc-alt): factor out off-chain cluster #21160
Open
amnn
wants to merge
7
commits into
main
Choose a base branch
from
amnn/rpc-test-refactor
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The latest updates on your projects. Learn more about Vercel for Git ↗︎
2 Skipped Deployments
|
7 tasks
6346807
to
7ba0aa9
Compare
7 tasks
d596e6c
to
eba4d34
Compare
1b0bcab
to
24120c7
Compare
eba4d34
to
96492d2
Compare
24120c7
to
a2dcf95
Compare
96492d2
to
7c4e5c1
Compare
a2dcf95
to
a88ee51
Compare
7 tasks
Base automatically changed from
amnn/clean-move-build
to
amnn/rpc-owned-objs
February 13, 2025 16:19
## Description Generalize `Resolver::function_parameters` so that it returns the fully resolved function signature. Previously this function was used to infer transaction input layouts, but we also need roughly the same logic for returning a normalized move function. ## Test plan Updated package resolver tests: ``` sui$ cargo nextest run -p sui-package-resolver ```
## Description Consistently use the canonical display format with prefix in error messages from the package resolver. ## Test plan Existing tests: ``` sui$ cargo nextest run \ -p sui-indexer-alt-e2e-tests \ -p sui-graphql-e2e-tests \ -p sui-mvr-graphql-e2e-tests \ -p sui-package-resolver ```
## Description Fetch a function's signature. Note that this implementation uses the package resolver, so unlike the current JSON-RPC, this will correctly relocate package IDs for types that are introduced in upgraded packages. ## Test plan New E2E tests: ``` sui$ cargo nextest run -p sui-indexer-alt-e2e-tests \ -- move/functions ```
## Description Pull out `OffChainCluster` from the transactional test runner set-up code, so that it can be used for non-transactional tests. ## Test plan Run existing tests: ``` sui$ cargo nextest run -p sui-indexer-alt-e2e-tests ```
## Description Move the logic for waiting for a checkpoint into the extracted `OffchainCluster` type. At the same time it can be made more robust in two ways: - The previously introduced special cases for pruner pipelines can be removed, now that those pruners are no longer classed as pipelines. - A function has been added for the indexer to report which pipelines it is going to populate, so that the cluster can make sure all of those pipelines are reporting progress. ## Test plan Existing E2E tests: ``` sui$ cargo nextest run -p sui-indexer-alt-e2e-tests ```
## Description ...in preparation for introducing more E2E tests in the same crate. ## Test plan CI
## Description Add a new type to the library supporting E2E tests that combines an off-chain cluster with an instance of simulacrum. This can be used to drive E2E tests that need to configure indexing and RPC to a greater degree than is possible with transactional tests. This type will be used to write tests for SuiNS-related JSONRPC-methods, which require us to publish some code on-chain and extract some IDs from that process before we set-up the indexer. ## Test plan Will be used for writing tests in a follow-up change.
a88ee51
to
4a958cb
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Factor out the type --
OffchainCluster
-- used by the transactional test runner to interact withsui-indexer-alt
andsui-indexer-alt-jsonrpc
and build a new type --FullCluster
-- that combines it with an instance ofSimulacrum
to support E2E tests that involve more granular set-up than is currently possible with transactional tests. This type will be used to build tests for SuiNS that require running some transactions to set-up chain state before the indexer can be configured and run.As part of this change, we also make the implementation of
wait_for_checkpoint
more robust, by querying the indexer for the full list of pipelines it is going to populate and making sure it gets a response for each of those from the watermarks table.We also rename the
tests
binary totransactional_tests
in preparation for including more tests here.Test plan
Existing tests:
Stack
Release notes
Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.
For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.