This directory contains integration tests that run against a local Stellar sandbox with real transaction signing via stellar-cli.
Unlike unit tests in packages/contracts/contracts/linkora-contracts/src/test.rs, these tests do not use Env::default() or mock_all_auths().
The E2E script validates these flows on a running sandbox:
- profile creation
- follow relationship
- post creation
- tipping via token contract interaction
- pool deposit and pool withdraw
- Docker
- Rust toolchain
stellarCLI v22.8.1 inPATH
Install the required version:
cargo install --locked stellar-cli --version 22.8.1From repository root:
pnpm test:integrationOr directly:
./tests/integration/run_e2e.shThe script will:
- Start a local sandbox container.
- Generate/fund test identities.
- Build and deploy
linkora-contractswasm. - Deploy a token contract for native asset interactions.
- Execute signed invocations for profile/follow/post/tip/pool flows.
- Assert expected state from contract view calls.
- Stop the sandbox and clean temporary config.
Integration tests are kept separate from unit tests because they require Docker and a running sandbox.
The dedicated workflow is at .github/workflows/integration.yml. It:
- Triggers on
workflow_dispatch(manual) and on a nightly schedule (02:00 UTC). - Installs Rust,
stellar-cli, and verifies Docker availability before running the suite. - Is intentionally separate from the unit-test CI workflow so standard PRs are not blocked by sandbox requirements.
To trigger the integration run manually, go to Actions → Integration Tests → Run workflow in the GitHub UI.
Unit tests continue to run in their own workflow on every push/PR:
- name: Run unit tests
run: pnpm --filter contracts test