Repository navigation
fix(streaming): wire up test_features module and fix its failing tests - #625
Merged
Austinaminu2 merged 1 commit intoAug 25, 2026
Merged
Conversation
mod test_features; was declared but the crate failed to compile due to cleanup_stream missing a trailing Ok(()), so the file's 26 tests never ran. Fix the compile error, then fix five real bugs in the tests themselves (missing #[should_panic], a get_stream call on a stream that was never created, and an assertion that didn't account for elapsed time). Also fix three pre-existing #[should_panic(expected = ...)] string mismatches in test.rs and test_security.rs that predate this change, and clean up clippy/fmt so the contract CI job is green again.
Markodiba6399
had a problem deploying
to
staging
August 25, 2026 17:02 — with
GitHub Actions
Failure
This branch had an error being deployed
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.
Summary
mod test_features;was already declared inlib.rs, but the crate failed to compile becausecleanup_streamfell off the end of its body without returningOk(())despite itsResult<(), StreamError>signature — so the file's 26 tests (minus 8 already removed for thepartial_cancelcleanup) never actually ran.test_features.rsitself:test_pause_blocks_create_stream/_withdraw/_cancelwere missing#[should_panic]even though the contract correctly rejects these calls while paused (ContractPaused/Add frontend unit tests for stream-utils.ts #16).test_only_admin_can_unpausecalledget_streamon a stream that was never created.test_withdraw_event_includes_remaining_withdrawableassertedremaining > 0immediately after withdrawing the full unlocked amount at the same timestamp, which is mathematically 0.#[should_panic(expected = "...")]string mismatches intest.rsandtest_security.rs(unrelated totest_features, but block a greencargo test): panic messages are now typedError(Contract, #N), not the old descriptive strings.cargo fmtontest_features.rs(never checked before since it wasn't compiling) and fixed 2 clippy lifetime-elision errors that only surface under-D warnings.Test plan
cargo test— 148 passed, 0 failedcargo clippy --all-targets -- -D warnings— cleancargo fmt --all -- --check— cleancargo build --target wasm32v1-none --release— succeedscargo audit— no vulnerabilities (2 pre-existing allowed warnings)node scripts/soroban-security-check.mjs— no issuescloses #522