Skip to content

test: add a testnet end-to-end smoke test for the full campaign lifecycle #47

Description

@JamesVictor-O

Background

All existing test coverage runs against soroban_sdk::testutils::Env — a mocked, in-process host environment. That's the right tool for fast unit/logic testing (and this repo has a lot of good coverage there now), but it doesn't exercise real network semantics: actual transaction submission, real stellar contract invoke argument encoding, real TTL/rent behavior over ledger time, real Stellar Asset Contract token behavior, or the actual deploy.sh script (#23) that's meant to be how these contracts get deployed in practice.

Right now nobody has verified that a freshly-deploy.sh'd pair of contracts on testnet can actually complete a full campaign lifecycle end-to-end through the real CLI — only that the Rust logic is correct in a mock.

Expected behaviour

A script (e.g. scripts/testnet-smoke-test.sh, or a justfile/Makefile target) that, against a real testnet deployment:

  1. Runs deploy.sh (or assumes contracts are already deployed and takes their IDs as input)
  2. Funds two or three testnet accounts via friendbot
  3. Drives a full campaign lifecycle purely through stellar contract invoke calls: create_campaignfund_campaignapply_to_campaignapprove_creatorsubmit_proofapprove_submissionclaim_payment
  4. Asserts on-chain balances moved as expected (via stellar contract invoke -- get_campaign / a Horizon balance query)

This doesn't need to run on every CI push (testnet dependency, funded accounts, network flakiness), but should be runnable on demand — e.g. a manually-triggered GitHub Actions workflow, or just documented as a pre-release checklist item — so there's some point before a mainnet deployment where the actual deployed artifact gets exercised, not just the source.

Files

  • New script under scripts/ or similar
  • Possibly a new, manually-triggered CI workflow

Acceptance criteria

  • A script exists that drives a full campaign lifecycle against a real (testnet) deployment purely through the CLI, not cargo test
  • It fails loudly (non-zero exit, clear error) if any step's on-chain result doesn't match expectations
  • Documented in the README or docs/ARCHITECTURE.md as part of the pre-deployment checklist

Metadata

Metadata

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions