Skip to content

Add unit tests for stream creation edge cases #232

@ogazboiz

Description

@ogazboiz

Join our community: https://t.me/+DOylgFv1jyJlNzM0

Description

The contract test suite covers initialization and fee config but has minimal coverage for stream creation. Edge cases in create_stream() are untested and could hide subtle bugs.

Test Cases Needed

  • test_create_stream_minimum_amount — minimum viable deposit
  • test_create_stream_minimum_duration — single ledger duration
  • test_create_stream_max_i128_amount — overflow guard
  • test_create_stream_invalid_token — non-SAC token address
  • test_create_stream_self_stream — sender == recipient
  • test_create_stream_zero_rate — amount too small for duration
  • test_stream_id_uniqueness — two streams between same parties

Files

  • contracts/stream_contract/src/test.rs

Acceptance Criteria

  • All listed tests added and passing
  • cargo test passes clean

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programsmart-contractSoroban smart contracttestingTesting related tasks

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions