cord icon indicating copy to clipboard operation
cord copied to clipboard

[C4GT] DID: Add tests for `MaxKeyAgreementKeysExceeded`

Open vatsa287 opened this issue 1 year ago • 1 comments

Description

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

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

Goals

  • [ ] Add tests for MaxKeyAgreementKeysExceeded for pallet/did

Expected Outcome

  • [ ] Test should assert for MaxKeyAgreementKeysExceeded 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: check_invalid_signature_format_call_error which validates error code InvalidSignatureFormat

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

i made a pull request assign it to me and merge my pull request

Aloneking789 avatar Mar 25 '24 09:03 Aloneking789

Sir I would like to know if this issue is still active or not? If it is still active then I would love to work on this and contribute, also please provide me some documentation so I can get more details.

krishnamonga avatar Nov 21 '24 15:11 krishnamonga

@vatsa287 is this issue still open? can i work on this issue?

prathmesh703 avatar Jan 14 '25 13:01 prathmesh703

@vatsa287 should i work on this issue?

Vaibhavsahu2810 avatar Mar 14 '25 08:03 Vaibhavsahu2810

@vatsa287 pls assign this issue to me.

Richajaishwal0 avatar Apr 13 '25 09:04 Richajaishwal0

@vatsa287 pls assign this issue to me.

kamat-abhi avatar Apr 14 '25 19:04 kamat-abhi

@vatsa287 and team,

I'd like to contribute to this issue.

From the task, the goal is to add a test case for the MaxKeyAgreementKeysExceeded error in the pallet-did module of the CORD project. This is similar in structure to existing test cases like check_invalid_signature_format_call_error, which test the triggering of specific errors.

✅ Plan of Action: Understand the error: Identify all function calls in pallet-did where MaxKeyAgreementKeysExceeded can be returned.

Study existing tests: Review other error-based test cases like check_invalid_signature_format_call_error for structure.

Write a test case that triggers the MaxKeyAgreementKeysExceeded condition by:

Creating a DID with the maximum allowed number of key agreement keys.

Attempting to add one more to exceed the limit.

Assert the correct error (MaxKeyAgreementKeysExceeded) is returned.

Use cargo test -p pallet-did to ensure it passes and integrates with the test suite.

If this issue is still open, I would love to work on it. Please confirm or assign me so I can get started. Also, if there's any internal limit set for key agreement keys or helper functions I should know about, please guide me.

Thanks!

rahulbamnuya avatar Apr 20 '25 23:04 rahulbamnuya

@rahulbamnuya great summary. Thanks for taking time. Would like you to look at below message and look at CORD's issues again.

-- We are moving away from the 'DID' pallet described here to pallet/profile instead of what exists now:

Hence, closing this issue.

Refer to https://github.com/dhiway/cord/blob/develop/docs/cord-features.md to get more idea about what features you can contribute on.

amarts avatar Apr 21 '25 01:04 amarts