Skip to content

test(audit_registry): add integration tests for verify() - #2

Open
devnWisdom wants to merge 1 commit into
mainfrom
feat/audit-registry-verify-test-563
Open

test(audit_registry): add integration tests for verify()#2
devnWisdom wants to merge 1 commit into
mainfrom
feat/audit-registry-verify-test-563

Conversation

@devnWisdom

Copy link
Copy Markdown
Owner

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 tests
  • Module registered in lib.rs under #[cfg(test)]

Tests added

Test What it verifies
verify_returns_none_for_unanchored_hash verify() returns None before anchoring
verify_returns_anchor_with_correct_reading_hash returned reading_hash matches the anchored hash
verify_records_ledger_sequence_at_anchor_time anchored_at_ledger is set to the ledger at anchor time
verify_ledger_sequence_is_not_current_ledger_if_anchored_earlier advancing ledger after anchor doesn't mutate stored sequence
verify_is_idempotent multiple verify() calls return identical results
verify_distinguishes_two_hashes two independent hashes have independent anchors and ledger seqs
verify_unchanged_after_rejected_duplicate_anchor failed re-anchor doesn't overwrite the original
verify_works_with_all_zeros_hash boundary hash [0x00; 32]
verify_works_with_all_ones_hash boundary hash [0xFF; 32]

Closes AnnabelJoe#563

)

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
@github-actions

Copy link
Copy Markdown

🔍 Vercel Preview Deployment

URL: Learn More: https://err.sh/vercel/missing-token-value

Uses Stellar testnet contract addresses.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant