[C4GT] DID: Add tests for `MaxKeyAgreementKeysExceeded`
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
MaxKeyAgreementKeysExceededfor pallet/did
Expected Outcome
- [ ] Test should assert for
MaxKeyAgreementKeysExceededbeing 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]
i made a pull request assign it to me and merge my pull request
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.
@vatsa287 is this issue still open? can i work on this issue?
@vatsa287 should i work on this issue?
@vatsa287 pls assign this issue to me.
@vatsa287 pls assign this issue to me.
@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 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.