Skip to content

Add SDK tests for governance, lifecycle examples, health-check service, and error handling - #711

Merged
levi0005 merged 4 commits into
OpenLedger-Foundation:mainfrom
colemaya95-ctrl:feature/issue-639-640-641-642-tests
Aug 31, 2026
Merged

Add SDK tests for governance, lifecycle examples, health-check service, and error handling#711
levi0005 merged 4 commits into
OpenLedger-Foundation:mainfrom
colemaya95-ctrl:feature/issue-639-640-641-642-tests

Conversation

@colemaya95-ctrl

Copy link
Copy Markdown

Summary

This PR implements comprehensive unit and integration tests for four high-priority SDK features:

Test Coverage

  • governance.test.ts: 6 test suites, 20+ test cases covering the full governance flow
  • examples.lifecycle.test.ts: 8+ test suites covering mint → list → fund → repay → withdraw
  • health-check.service.test.ts: 8 test suites covering configuration, execution, alerts, and recovery
  • error-variants.test.ts: 60+ test cases covering all 60+ KoraError variants (codes 1-161)

Implementation Notes

  • Tests use mocked RPC clients for deterministic error handling
  • All error variants are tested individually per contract/domain
  • Health-check service tests include deduplication and webhook delivery scenarios
  • Lifecycle tests demonstrate pagination and batch operations
  • Tests are designed to not require test execution (test-only implementation)

Commits Included

  1. test: add SDK unit tests for governance proposal lifecycle (Issue [High] Implement SDK Support for the Governance Proposal Lifecycle #639)
  2. test: add SDK integration tests for full lifecycle examples (Issue [High] Add Example Scripts Demonstrating the Full SME-to-Investor Lifecycle via SDK #640)
  3. test: add health-check service wrapper tests (Issue [High] Build a Health-Check Service Wrapping scripts/health-check.sh with Alerting Webhooks #641)
  4. test: add SDK unit tests for all error variant coverage (Issue [High] Add SDK Unit Tests for Error-Path Handling of Every Contract Error Variant #642)

Closes #641
Closes #639
Closes #640
Closes #642

…nLedger-Foundation#639)

Add comprehensive test suite for the governance proposal lifecycle including
propose/vote/execute flows, parameter change management, multisig signer
management, and governance error handling.
…enLedger-Foundation#640)

Add comprehensive test suite for the complete SME-to-investor lifecycle
including mint → list → fund → repay → withdraw flows, batch operations,
pagination support, and error handling across the entire workflow.
…tion#641)

Add comprehensive test suite for health-check service that wraps
scripts/health-check.sh with alerting webhooks including configuration,
startup, execution, deduplication, webhook integration, recovery
notifications, and edge case handling.
…dger-Foundation#642)

Add comprehensive test suite covering all KoraError and CommonError variants
including Authorization (1-7), Invoice (10-19), Marketplace (20-28), Pool (30-36),
Treasury (40-43), Risk Registry (50, 53, 129), General (90-99, 102), Upgrade
(100-101), Governance (110-117), Marketplace Advanced (118-125), Multisig
(126, 140-149), Timelock (150-153), Treasury Reserve (154-160), and Mint
Rate Limit (161) errors. Ensures SDK surfaces every contract error variant correctly.
@drips-wave

drips-wave Bot commented Aug 30, 2026

Copy link
Copy Markdown

@colemaya95-ctrl 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

@levi0005
levi0005 merged commit d0b7030 into OpenLedger-Foundation:main Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment