test(swift-sdk): first swift sdk integration tests with local network#3712
Draft
ZocoLini wants to merge 2 commits into
Draft
test(swift-sdk): first swift sdk integration tests with local network#3712ZocoLini wants to merge 2 commits into
ZocoLini wants to merge 2 commits into
Conversation
Contributor
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
4133325 to
93ee976
Compare
…vnet New `SwiftDashSDKIntegrationTests` target gated by `RUN_INTEGRATION_TESTS=1` (skips otherwise so `swift test` stays a no-op for callers that haven't opted in). Mirrors the pattern used by rust-dashcore/dash-spv: spin up a real node, drive the SDK against it, assert on observable state. Framework (Support/): - `Shell`: subprocess wrapper used by the dashmate driver. - `CoreRPCClient`: minimal JSON-RPC client for dashd. - `LocalDevnet`: dashmate lifecycle + port discovery via `yarn dashmate config get` (picks up the merged base/local/preset chain that `~/.dashmate/config.json` alone would miss). - `Wait`: async polling helper with timeout + message. - `IntegrationTestEnv`: suite-shared env (Core RPC client, SDK pointed at local DAPI, suite-shared `PlatformWalletManager`, SPV start latch, fund / mine / makeTestWallet helpers). - `IntegrationTestCase`: base XCTestCase with the gate and a success-or-failure latch around `IntegrationTestEnv.bootstrap`. - `TestWallet`: fresh wallet wrapper exposing receive / balance / fund / waitForSpendable / send. Tests (14 total): - `CoreRPCIntegrationTests` (3): chain tip, mine, fund + confirm round-trip via Core RPC. - `WalletLifecycleIntegrationTests` (3): mnemonic-backed wallet creation, zero initial balance, multi-wallet independence. - `WalletFromSeedIntegrationTests` (1): raw 64-byte seed ctor. - `AddressDerivationIntegrationTests` (2): BIP-44 receive↔change pool distinctness (the two pools go through separate FFI paths). - `CoreSendIntegrationTests` (4): SPV-funded balance observation, full Core→Core round-trip, wallet↔wallet via the shared SPV UTXO matcher, insufficient-funds error path. - `SDKBootstrapIntegrationTests` (1): floor that every Platform-side test layers on — `SDK.getStatus()` against local DAPI. Also: `run_integration_tests.sh` builds the macOS xcframework slice and runs the suite; new test target wired into `Package.swift`; README documents one-time dashmate setup, env vars, and the surface `env` exposes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
93ee976 to
7c54dac
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.
Issue being fixed or feature implemented
What was done?
How Has This Been Tested?
Breaking Changes
Checklist:
For repository code-owners and collaborators only