cord icon indicating copy to clipboard operation
cord copied to clipboard

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

Open vatsa287 opened this issue 1 year ago • 7 comments

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

  • [ ] Add tests for MaxMembersExceededForTheBlock for pallet/network-membership

Expected Outcome

  • [ ] Test should assert for MaxMembersExceededForTheBlock being returned properly in all the possible calls.
  • [ ] If there are more than one function returning this error code, all of them should be validated either as one test case or as multiple test cases.

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]

vatsa287 avatar Feb 05 '24 16:02 vatsa287

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

Aloneking789 avatar Mar 25 '24 09:03 Aloneking789

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

PriyaD17 avatar Aug 10 '24 19:08 PriyaD17

@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.

vatsa287 avatar Aug 12 '24 04:08 vatsa287

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

@vatsa287 Pls assign it if possible.

VedantKhairnar avatar Aug 23 '24 06:08 VedantKhairnar

Hello @vatsa287 , I would like to work on this issue it seems inactive for a long time

Vaibhavsahu2810 avatar Jan 01 '25 18:01 Vaibhavsahu2810

@vatsa287 I saw that still no PR has been made for this issue, I would like to work on it

priyankeshh avatar Apr 16 '25 18:04 priyankeshh

Hi @vatsa287 I would like to take this issue. I come with years of experience and hands on experience on open source projects. You can check my Github Profile.

devmuse7 avatar May 01 '25 00:05 devmuse7