Add RPC integration tests and testnet11 smoke test#745
Closed
joshpainter wants to merge 1 commit intoxch-dev:mainfrom
Closed
Add RPC integration tests and testnet11 smoke test#745joshpainter wants to merge 1 commit intoxch-dev:mainfrom
joshpainter wants to merge 1 commit intoxch-dev:mainfrom
Conversation
Adds 25 in-process integration tests for the JSON/HTTP RPC layer (sage-rpc) and a comprehensive end-to-end smoke test script that exercises two Sage wallets against testnet11 with real blockchain transactions (DID, CAT, NFT, offers, transfers, coin split/combine). Key changes: - sage-cli: add --data-dir flag, fix Client::from_dir usage - sage-rpc: expose make_router() for test access without TLS - New: crates/sage-rpc/tests/rpc.rs (25 integration tests) - New: crates/sage-rpc/tests/smoke_test.sh (92 assertions) - New: .github/workflows/smoke.yml (manual dispatch CI) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
Author
|
The smoke-test takes about 10 minutes on testnet. It generates new wallets for Alice and Bob on every run. It will wait for you to fund Alice's wallet to start. 0.001 is fine. It will return any leftover TXCH back to the return address at the end from both wallets. Here's example of full test run: |
Collaborator
|
Thanks - I borrowed the architecture for the RPC tests for this PR #746 and will credit you in the release notes for it. I've avoided adding tests that use a real network since it makes CI flakey and slow. I think the Wallet SDK simulator should be sufficient for most things. |
This file contains hidden or 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
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.
Summary
crates/sage-rpc/tests/rpc.rs) that exercise the JSON → Axum → Sage → HTTP stack without networking or TLScrates/sage-rpc/tests/smoke_test.sh) with 92 assertions covering DIDs, CATs, NFTs, offers, transfers, coin split/combine, pagination, and read-only queries--data-dirflag tosage-clito support running multiple instances with separate data directoriesClient::new()→Client::from_dir(&path)so CLI subcommands respect--data-dirmake_router()in sage-rpc for integration test access without TLS.github/workflows/smoke.ymlfor manual-dispatch CI against testnet11Test plan
cargo test -p sage-rpc— 25 integration tests pass./crates/sage-rpc/tests/smoke_test.sh— 92/92 assertions pass on testnet11🤖 Generated with Claude Code