dhiway / cord

CORD - Enterprise Blockchain Framework
https://cord.network
GNU General Public License v3.0
121 stars 105 forks source link

[C4GT] Network-Membership: Add tests for `MaxMembersExceededForTheBlock` #293

Open vatsa287 opened 7 months ago

vatsa287 commented 7 months ago

Description

Subtask under : https://github.com/cord-network/community/issues/7

New testcase can be tested under cargo test -p pallet-network-membership after adding it in the code.

Goals

Expected Outcome

Acceptance Criteria

NA

Implementation Details

Look at other test cases, and add a test case for the same. Ex: test_duplicate_member_request which validates error code MembershipAlreadyAcquired

Mockups / Wireframes

NA


Product Name

CORD

Organization Name

Dhiway

Domain

Blockchain

Tech Skills Needed

Rust

Mentor(s)

@amarts

Complexity

[Low]

Category

[Test]

Sub Category

[Beginner friendly]

Aloneking789 commented 6 months ago

assign it to me i am making a pull request please merge it

PriyaD17 commented 1 month ago

hey @amarts in this project we have to assert for Maximum Members Exceeded For The Block and we need to add this test to pallets/network-membership path that should pass the Cargo test. Have I got the right idea? let me know if I am wrong otherwise please assign me this issue so I can start working on it. Thankyou

vatsa287 commented 1 month ago

@PriyaD17 Yes, the storage map has compile time upper bound set to type MaxMembersPerBlock: Get<u32>; for the storage map MembershipsExpiresOn. Try adding more than this number for the error to hit.

VedantKhairnar commented 1 month ago

Hello @PriyaD17 @Aloneking789 Pls directly raise the PR. Thanks.

@vatsa287 Pls assign it if possible.