test: integration coverage for gdpr, factory, ipfs-metadata and fractional contracts - #1053
Merged
nanaf6203-bit merged 1 commit intoAug 25, 2026
Conversation
…ractional Adds integration test modules to the propchain-tests suite (declared in tests/lib.rs) covering four contract crates that had zero integration coverage: - GDPR (MettaChain#1005): grant -> check -> withdraw consent lifecycle, subject vs admin withdraw authorization, data-access request/fulfillment with the admin gate enforced, zero-duration rejection (InvalidDuration), per-purpose consent independence, unknown-id lookups. - Factory (MettaChain#1006): code-hash registration round-trip and non-admin rejection, deploy without a registered hash rejected via CodeHashNotSet, deployment registry recording (count/deployer list), change_admin lockout of the old admin. - IPFS metadata (MettaChain#1007): validate_and_register_metadata storage assertions including the documented AccessLevel::Admin escalation path, CID validation matrix, metadata validation rejections, unauthorized document/verification attempts rejected. - Fractional (MettaChain#1008): mint -> list -> buy full settlement with balance updates, partial purchase updating the listing, underpayment and oversized-purchase rejections, cancel_listing blocking purchases. Also declares propchain-gdpr, propchain-factory and ipfs-metadata as test-crate dependencies and makes the gdpr/fractional/ipfs-metadata contract modules `pub` so they can be imported cross-crate (ink! v5 requires a public module path; factory already had it). No business logic is changed. All 42 tests in `cargo test -p propchain-tests` pass, including 22 new ones. Closes MettaChain#1005 Closes MettaChain#1006 Closes MettaChain#1007 Closes MettaChain#1008
|
@devbackend513-ux 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! 🚀 |
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 integration test coverage in
tests/for four contract crates that previously had none: gdpr (#1005), factory (#1006), ipfs-metadata (#1007) and fractional (#1008). New modules are declared intests/lib.rs, following the existingintegration_bridge_oracle.rspattern.What's covered
CodeHashNotSetrejection on unregistered deploy, deployment registry recording, change_admin lockoutvalidate_and_register_metadataincl. the documentedAccessLevel::Adminescalation path, CID/metadata validation matrix, unauthorized attemptsSupporting changes
tests/Cargo.toml: declarepropchain-gdpr,propchain-factory,ipfs-metadata.pubon thegdpr_consent/fractional/ipfs_metadatacontract modules (ink! v5 requires a public module path for cross-crate imports).No business logic changed.
Testing
cargo test -p propchain-tests→ 42 passed (22 new)Closes #1005
Closes #1006
Closes #1007
Closes #1008