test(shipment): add TTL regression tests for issue #377#418
Open
adefemiesther1-debug wants to merge 1 commit into
Open
test(shipment): add TTL regression tests for issue #377#418adefemiesther1-debug wants to merge 1 commit into
adefemiesther1-debug wants to merge 1 commit into
Conversation
- test_ttl_extended_on_active_mutation: verifies that update_status on an active shipment refreshes persistent storage TTL to at least the configured shipment_ttl_extension (518_400 ledgers). - test_ttl_not_extended_for_archived_terminal_shipment: verifies that a cancelled+archived shipment is removed from persistent storage, making TTL extension a no-op for terminal-state entries. Both tests use env.as_contract() to inspect persistent storage TTL and presence directly, matching the Soroban SDK test pattern used throughout the existing test suite. Registers mod test_ttl_health in lib.rs under #[cfg(test)].
cb54e5b to
de11279
Compare
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.
Description
This PR implements robust regression test coverage validating Time-To-Live (TTL) storage tier extensions upon state mutations in the shipment ledger framework. It introduces dedicated test suites proving that active tracking transitions correctly reset rent thresholds while terminal states bypass unnecessary rent extensions.
All implementations have been fully vetted to comply with remote repository workflows and ensure a green pipeline run on GitHub.
Type of Change
Implementation Details
contracts/shipment/src/test.rs.test_ttl_health.rs): Built sequential flows confirming that when a shipment undergoes create/update transitions, the contract environment automatically extends instance/persistent entry constraints via the Soroban storage host hooks.How Has This Been Tested?
cargo testagainst theshipmentcontract component workspace.cargo clippyandcargo fmt) with zero warnings to guarantee successful GitHub CI integration.Checklist:
feature/issue-377-ttl-regression-tests)Fixes #377