feat: add integration tests against real Tempo node#60
Merged
brendanjryan merged 3 commits intomainfrom Feb 19, 2026
Merged
Conversation
Add integration tests that run against a local Tempo blockchain node, matching the pattern from mpp-rs. Tests cover: - Credential creation with real transaction building - Transaction credential verification (sign + submit + verify) - Hash credential verification (pre-sent tx hash) - Rejection of insufficient transfer amounts - Rejection of wrong recipient addresses - Full client→server payment roundtrip via PaymentTransport - Free endpoint passthrough (no payment required) - 402 response without matching payment method Infrastructure: - docker-compose.yml for local Tempo --dev node - Makefile targets: node, node-stop, test-integration - conftest.py with account funding (faucet RPC + dev key fallback) - Integration marker auto-skips when TEMPO_RPC_URL is unset All 234 unit tests pass. 9 integration tests pass against local node.
Add 10 new integration tests covering: - Receipt header parsing (status, method, reference) - Wrong auth scheme (Bearer) returns 402 - Malformed credential returns 402 - Multiple sequential payments with unique receipts - Client balance decreases after payment - Fee payer E2E charge roundtrip (client + server) - Fee payer balance accounting (client pays exact amount, no gas) - Fee payer with no signer configured fails - Fee payer wrong recipient rejected pre-broadcast - Premium charge (000 amount tier) All tests run against a local Tempo node (TEMPO_RPC_URL).
c20665b to
fab7b45
Compare
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
Add integration tests that run against a local Tempo blockchain node, matching the coverage from mpp-rs.
Test Coverage
Tempo intent tests (
test_tempo_integration.py— 8 tests):Client↔server roundtrip tests (
test_client_integration.py— 11 tests):PaymentTransport+verify_or_challenge()Bearer) is sentbalanceOfbefore/after)Infrastructure
docker-compose.yml— local Tempo--devnode (multi-arch, 200ms blocks)Makefiletargets:make node,make node-stop,make test-integrationconftest.py— session-scoped account funding (faucet RPC with dev key fallback)TEMPO_RPC_URLis unsetRunning