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

rpc-alt: e2e tests #20729

Open
wants to merge 4 commits into
base: amnn/rpc-metrics
Choose a base branch
from
Open

rpc-alt: e2e tests #20729

wants to merge 4 commits into from

Conversation

amnn
Copy link
Member

@amnn amnn commented Dec 24, 2024

Description

Add support for testing JSON-RPC methods in the transactional test runner, and set-up some tests for sui-indexer-alt and sui-indexer-alt-jsonrpc (testing the test framework itself, and the RGP method).

Test plan

sui$ cargo nextest run -p sui-indexer-alt-e2e-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.

  • Protocol:
  • Nodes (Validators and Full nodes):
  • gRPC:
  • JSON-RPC:
  • GraphQL:
  • CLI:
  • Rust SDK:

amnn added 4 commits December 24, 2024 14:24
## Description
Make various configs public, mainly so they can be used from the test
config.

## Test plan
CI
## Description

This change adds a new custom command to the transactional test runner
for calling a JSON-RPC query. This is supported by a new function on the
`OffchainStateReader` trait to execute that JSON-RPC query, which is
implemented trivially in the GraphQL transactional tests.

## Test plan
CI
## Description
Set-up transactional tests for Indexer-Alt and RPC-Alt

## Test plan

Run the new transactional tests:

```
sui$ cargo nextest run -p sui-indexer-alt-e2e-tests
```
## Description
This used to be part of the interface neded by the transactional test
runner to talk to the off chain state of the test cluster, but it is no
longer in use (and isn't necessary for `sui-indexer-alt`), so it's
easiest to get rid of it.

## Test plan

```
sui$ cargo nextest run         \
  -p sui-indexer-alt-e2e-tests \
  -p sui-graphql-e2e-tests
```
@amnn amnn requested review from bmwill and gegaowp December 24, 2024 16:14
@amnn amnn self-assigned this Dec 24, 2024
Copy link

vercel bot commented Dec 24, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
multisig-toolkit ⬜️ Ignored (Inspect) Dec 24, 2024 4:14pm
sui-kiosk ⬜️ Ignored (Inspect) Dec 24, 2024 4:14pm
sui-typescript-docs ⬜️ Ignored (Inspect) Dec 24, 2024 4:14pm

@amnn amnn temporarily deployed to sui-typescript-aws-kms-test-env December 24, 2024 16:14 — with GitHub Actions Inactive
@amnn amnn requested a review from lxfind December 24, 2024 16:14
// The test description is at the top because the JSON does not have explicit
// syntax for comments.

//# run-graphql
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be run-jsonrpc?
Also curious why it was possible to mix up? Should we error if it happens?

Copy link
Member Author

Choose a reason for hiding this comment

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

No this is as intended. We do error if you try to run the wrong kind of query, and in fact this is the test for that (see the comments above this line).

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