Skip to content

unit tests#16

Merged
CodeWarriorr merged 5 commits intomainfrom
feature/utests
Nov 3, 2025
Merged

unit tests#16
CodeWarriorr merged 5 commits intomainfrom
feature/utests

Conversation

@CodeWarriorr
Copy link
Copy Markdown
Collaborator

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a comprehensive suite of unit tests with accompanying mock contracts and helper libraries, and updates facet implementations to support virtual selector overrides and enhanced configuration validation.

  • Adds mock contracts (VerifRegApiMock, DataCapApiMock, ActorMock, StorageMock, ConstantMock) and CBOR test libraries for serialization tests.
  • Implements a broad range of Solidity unit tests covering facets, diamond initialization, allocation logic, and configuration edge cases.
  • Updates facet code to mark selectors() methods as virtual and refines the setDataCapTermMaxDays validation logic.

Reviewed Changes

Copilot reviewed 30 out of 30 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
test/mocks/VerifRegApiMock.sol Added mock fallback logic; note duplicate import of StorageMock.
test/mocks/StorageMock.sol Implements persistent storage for mocks; minor typo in comments.
src/facets/OwnerFacet.sol Adjusted data cap term maximum validation; potential unit mismatch.
test/AllocateFacet.t.sol Added allocation scenario tests; contract name vs. filename mismatch.
.env.example Updated example config comments for collateral and replica settings.
Comments suppressed due to low confidence (1)

test/AllocateFacet.t.sol:10

  • [nitpick] The contract is named AllocatorFacetTest but the file is AllocateFacet.t.sol. Consider aligning the contract name and filename (e.g., AllocateFacetTest) for clarity.
contract AllocatorFacetTest is Test, AllocateHelper {

Copy link
Copy Markdown
Contributor

@JAG-UK JAG-UK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you :-)

@CodeWarriorr CodeWarriorr merged commit c623bb1 into main Nov 3, 2025
2 checks passed
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.

3 participants