test(audit_registry): add integration tests for verify() - #2
Open
devnWisdom wants to merge 1 commit into
Open
Conversation
) Adds verify_integration_test module with 9 integration tests covering: - verify() returns None for unanchored hashes - verify() returns correct reading_hash and anchored_at_ledger - ledger sequence is recorded at anchor time, not query time - verify() is idempotent across multiple calls - two distinct hashes have independent anchors - duplicate anchor rejection does not overwrite original anchor - boundary values (all-zeros, all-ones) Closes AnnabelJoe#563
🔍 Vercel Preview DeploymentURL: Learn More: https://err.sh/vercel/missing-token-value
|
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
Adds a dedicated integration test module for
audit_registry::verify()covering the full anchor → verify round-trip.What's included
audit_registry/src/verify_integration_test.rs— 9 integration testslib.rsunder#[cfg(test)]Tests added
verify_returns_none_for_unanchored_hashverify()returnsNonebefore anchoringverify_returns_anchor_with_correct_reading_hashreading_hashmatches the anchored hashverify_records_ledger_sequence_at_anchor_timeanchored_at_ledgeris set to the ledger at anchor timeverify_ledger_sequence_is_not_current_ledger_if_anchored_earlierverify_is_idempotentverify()calls return identical resultsverify_distinguishes_two_hashesverify_unchanged_after_rejected_duplicate_anchorverify_works_with_all_zeros_hash[0x00; 32]verify_works_with_all_ones_hash[0xFF; 32]Closes AnnabelJoe#563