Skip to content

Feat/sdk integration tests#230

Merged
pragmaticAweds merged 3 commits into
Fundable-Protocol:mainfrom
Babigdk:feat/sdk-integration-tests
Apr 29, 2026
Merged

Feat/sdk integration tests#230
pragmaticAweds merged 3 commits into
Fundable-Protocol:mainfrom
Babigdk:feat/sdk-integration-tests

Conversation

@Babigdk
Copy link
Copy Markdown
Contributor

@Babigdk Babigdk commented Apr 27, 2026

Closes #165

🧪 Feature: Integration Tests with Local Soroban

📌 Overview

This PR introduces integration tests for the SDK that interact with a local Soroban node to validate real contract deployment and interaction flows.


✅ What’s Included

  • Integration test suite under:
    src/deployer/__tests__/integration

  • Tests cover:

    • WASM upload
    • Contract deployment
    • Basic interaction
  • Environment-based configuration via .env.integration


⚙️ How to Run

  1. Start local Soroban node:
stellar contract sandbox start

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

* **Tests**
  * Introduced integration test infrastructure for contract deployment and interaction testing
  * Added integration test configuration and setup with environment variables for Soroban RPC connectivity
  * Updated test runner configuration to isolate integration tests from standard test execution

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

…ntegration tests - Configured separate test command - Excluded integration tests from default runs - Added environment-based configuration
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 27, 2026

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

This change introduces integration test infrastructure for the SDK by adding an environment configuration file, a test setup module that exports configuration from environment variables, and initial integration test file placeholders for contract deployment and interaction scenarios.

Changes

Cohort / File(s) Summary
Integration Test Configuration
packages/sdk/.env.integration, packages/sdk/vitest.config.ts
Adds environment variable configuration for integration tests (SOROBAN_RPC_URL, SOROBAN_NETWORK_PASSPHRASE, TEST_SECRET_KEY) and updates test exclusion patterns to isolate integration tests from standard test runs.
Test Setup
packages/sdk/src/__tests__/integration/setup.ts
Introduces TEST_CONFIG export that loads and validates integration test configuration from environment variables with runtime guards.
Integration Test Suites
packages/sdk/src/__tests__/integration/deploy.test.ts, packages/sdk/src/__tests__/integration/interaction.test.ts
Adds placeholder integration test cases for contract deployment (uploadWasm, deployContract) and contract interaction workflows with assertions on returned values.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Poem

🐰 Integration tests now hop in place,
With .env files and setup grace,
Soroban contracts we'll soon embrace,
Through deployment tests we'll find our race! 🌟

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Feat/sdk integration tests' clearly summarizes the main change - introduction of integration tests for the SDK.
Linked Issues check ✅ Passed The PR successfully implements integration tests that interact with a local Soroban node, excludes them from standard test runs via vitest config, and configures environment-based setup as required by #165.
Out of Scope Changes check ✅ Passed All changes are directly related to setting up integration tests for the SDK as specified in issue #165; no out-of-scope modifications detected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share
Review rate limit: 0/1 reviews remaining, refill in 60 minutes.

Comment @coderabbitai help to get the list of available commands and usage tips.

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Apr 27, 2026

@Babigdk 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

Resolves conflicts:
- packages/sdk/package.json: take main's version. Main now has the modern
  ESM/CJS dual build, regenerate scripts, and a working 'test:integration'
  script (added by PR Fundable-Protocol#231). PR's package.json had a missing comma after
  test:integration plus a duplicate 'test' key.
- packages/sdk/vitest.config.ts: combine excludes — keep main's
  __integration_tests__/ exclude (PR Fundable-Protocol#231) and add this PR's
  __tests__/integration/ exclude.

Note: this PR's tests live in src/__tests__/integration/, while main's
test:integration script (from PR Fundable-Protocol#231) targets src/__integration_tests__/.
The new tests are excluded from regular runs but won't be picked up by
test:integration either — wiring them in is left to a follow-up.
@pragmaticAweds pragmaticAweds merged commit d8c4aba into Fundable-Protocol:main Apr 29, 2026
2 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[SDK] Set up integration tests for using local Soroban

2 participants