Skip to content

test: integration tests for the basic_solana example#75

Merged
gregorydemay merged 16 commits intomainfrom
gdemay/XC-349-int-tests-basic-solana
Apr 22, 2025
Merged

test: integration tests for the basic_solana example#75
gregorydemay merged 16 commits intomainfrom
gdemay/XC-349-int-tests-basic-solana

Conversation

@gregorydemay
Copy link
Contributor

@gregorydemay gregorydemay commented Apr 17, 2025

Ensure that the instructions for trying out the basic_solana example are up-to-date by adding the following integration test:

  1. Local setup with Pocket IC and an instance of the SOL RPC canister that uses a local Solana test validator for RPC providers.
  2. Refactor basic_solana to split the code between a main.rs and a lib.rs, so that public types can be re-used in integration tests.
  3. The test follows the instructions in the examples/basic_solana/README.md file.

Left for future PRs:

  1. Testing SPL tokens is currently problematic because the dependency https://crates.io/crates/spl-token-2022 needed to craft instructions related to SPL tokens brings many conflicts among its transitive dependencies. This could be avoided by using the spl-token-cli command line tool.
  2. The Solana RPC client that interacts with the SOL RPC canister should offer a global commitment level. That will be addressed in a separate ticket (XC-350)

@gregorydemay gregorydemay changed the title test: integration tests for basic_solana test: integration tests for the basic_solana example Apr 22, 2025
@gregorydemay gregorydemay marked this pull request as ready for review April 22, 2025 15:11
@gregorydemay gregorydemay requested a review from a team as a code owner April 22, 2025 15:11
@gregorydemay gregorydemay requested a review from ninegua April 22, 2025 15:11
@gregorydemay gregorydemay merged commit e6ea719 into main Apr 22, 2025
11 checks passed
@gregorydemay gregorydemay deleted the gdemay/XC-349-int-tests-basic-solana branch April 22, 2025 19:54
gregorydemay added a commit that referenced this pull request Apr 24, 2025
Follow-up on #75 that improves the `SolRpcClient` by being able to set
in the client builder a default commitment level that will be used by
the built client for all future requests. This is similar to what the
Solana client offers with
[`new_with_commitment`](https://docs.rs/solana-client/latest/solana_client/rpc_client/struct.RpcClient.html#method.new_with_commitment).
gregorydemay added a commit that referenced this pull request Apr 28, 2025
Follow-up on #75 to also test the transfer of SPL tokens in the
`basic_solana` example.
@github-actions github-actions bot mentioned this pull request Jul 31, 2025
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