test: add verify_business_kyc boundary tests for missing, expired, an…#1682
Conversation
|
@roobie001 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
|
"Hi maintainers, I've successfully implemented the verify_business_kyc boundary tests as requested by #1548, and they pass perfectly locally. However, the CI build is failing due to compilation errors in unrelated modules (dispute.rs, pagination.rs, and duplicate compute_investor_tier signatures in verification.rs) currently present on the base branch. Could someone please rebase or pull in the fixes so the pipeline can turn green? Thanks!" |
|
add verify_business_kyc boundary tests for missing, expired, an… — good stuff, merging 👍 |
|
add verify_business_kyc boundary tests for missing, expired, an… — rebased onto main and merged 👍 |
This Pull Request addresses the thin test coverage within the verification module by implementing explicit boundary checks and associated unit tests for a newly introduced verify_business_kyc function.
Following a strict deny-by-default and pure function methodology, this validation layer checks business actors' KYC lifecycles using static ledger timestamps without relying on non-deterministic environment properties. This ensures perfect build compatibility in a #![no_std] Soroban smart contract framework.
Key Changes
Type Upgrades: Added the GuardError::KycExpired enum variant to explicitly communicate time-based validation failures.
Core Logic Implementation: Implemented verify_business_kyc, which accepts status options, an expiration timestamp limit, and a current ledger timestamp to handle actor authorization gates cleanly.
Boundary Test Matrix: Added assertive deterministic unit tests inside the tests submodule to seal the logic boundaries against future regressions.
Closes #1548