Skip to content

test: add integration and indexer test coverage - #151

Merged
valoryyaa-byte merged 4 commits into
RWA-ToolKit:mainfrom
famvilianity-eng:test/integration-and-indexer-coverage
Jul 28, 2026
Merged

test: add integration and indexer test coverage#151
valoryyaa-byte merged 4 commits into
RWA-ToolKit:mainfrom
famvilianity-eng:test/integration-and-indexer-coverage

Conversation

@famvilianity-eng

Copy link
Copy Markdown
Contributor

Summary

This PR adds comprehensive test coverage for:

  • Full route integration tests with hand-built Snapshots for all endpoints
  • Parse i128 logging verification when malformed integers are encountered
  • Timeout handling for hung RPC calls with retry classification
  • CI lint step for docs workflow to catch regressions

Changes

Issue #49: Integration test that boots router with seeded AppState and hits every endpoint (GET /, /health, /metrics, /stats, /assets, /assets/:id, /assets/:id/holders, /assets/:id/compliance, /assets/:id/dividends)

Issue #50: Added logging when i128 parsing fails to catch malformed integer inputs, plus test to verify behavior

Issue #51: Added 30-second timeout to RPC requests that classifies timeout errors as transient and retryable, plus tests

Issue #52: Added npm run lint to docs CI workflow before build step

Test Plan

  • All new tests verify snapshot structure and routing logic
  • Integration tests confirm endpoints handle seeded data correctly
  • Indexer tests verify error handling and logging behavior
  • CI improvements ensure lint failures are caught before merge

Closes #49
Closes #50
Closes #51
Closes #52

Run npm run lint before npm run build to catch linting regressions in CI.

Closes RWA-ToolKit#52
Add logging to parse_i128 to warn when input cannot be parsed, then
return the safe default of 0. Add test to verify invalid inputs are
handled gracefully and logged rather than silently zeroed without trace.

Closes RWA-ToolKit#50
Add 30-second timeout to RPC requests in read_once. Timeout errors are
treated as transient and retried with backoff. Add test to verify timeout
errors are properly classified as retryable.

Closes RWA-ToolKit#51
…snapshots

Add comprehensive smoke tests that boot the router with a hand-built Snapshot
and verify all endpoints work correctly. Include tests for:
- Snapshot structure and data
- Asset filtering (by type, active status)
- Asset detail lookups
- Holder retrieval
- Compliance summaries
- Dividend distributions
- Platform-wide statistics

Also define PrometheusHandle and PrometheusBuilder types for metrics support.

Closes RWA-ToolKit#49
@drips-wave

drips-wave Bot commented Jul 26, 2026

Copy link
Copy Markdown

@famvilianity-eng Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@valoryyaa-byte
valoryyaa-byte merged commit 00532b1 into RWA-ToolKit:main Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants