-
Notifications
You must be signed in to change notification settings - Fork 9
Added Utils unit tests - envelope and crypto #103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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 adds comprehensive unit tests for two utility modules - envelope wrapper and crypto - while adding nil checks for improved error handling. The changes enhance test coverage for cryptographic key serialization/parsing functions and envelope wrapping/unwrapping operations.
- Added nil input validation to crypto functions with corresponding error messages
- Created comprehensive test suites covering both valid and invalid input scenarios
- Refactored envelope wrapper to separate payload wrapping from full envelope wrapping
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| utils/signature/sigtest/crypto_test.go | New comprehensive test suite for crypto functions with edge cases |
| utils/signature/sigtest/crypto.go | Added nil check for signing key serialization |
| utils/serialization/envelope_wrapper_test.go | New test suite for envelope operations with error scenarios |
| utils/serialization/envelope_wrapper.go | Added nil header validation and refactored envelope wrapping |
7e6c2fc to
914f0f8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some more comments
6336dd6 to
1b6a599
Compare
Signed-off-by: Effi-S <[email protected]>
Signed-off-by: Effi-S <[email protected]>
Co-authored-by: Copilot <[email protected]> Signed-off-by: Effi-S <[email protected]> Signed-off-by: Effi-S <[email protected]>
Co-authored-by: Copilot <[email protected]> Signed-off-by: Effi-S <[email protected]> Signed-off-by: Effi-S <[email protected]>
Signed-off-by: Effi-S <[email protected]>
Signed-off-by: Effi-S <[email protected]>
…ializeAndParseSigningKey Signed-off-by: Effi-S <[email protected]>
Signed-off-by: Effi-S <[email protected]>
Signed-off-by: Effi-S <[email protected]>
Signed-off-by: Effi-S <[email protected]>
#### Type of change - Test update #### Description - [ServerConfig] Add retry mechanism when binding to a predefined port (`c.Listener()`). - [TestBroadcastDeliver] Use the above retry mechanism to ensure the port is not used by other tests. #### Related issues - resolves hyperledger#109 - resolves hyperledger#137 --------- Signed-off-by: Liran Funaro <[email protected]> Signed-off-by: Effi-S <[email protected]>
…o_modules group across 1 directory (hyperledger#168) Bumps the go_modules group with 1 update in the / directory: [github.com/consensys/gnark-crypto](https://github.com/consensys/gnark-crypto). Updates `github.com/consensys/gnark-crypto` from 0.14.0 to 0.18.1 Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: Liran Funaro <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Liran Funaro <[email protected]> Signed-off-by: Effi-S <[email protected]>
1b6a599 to
ae8b726
Compare
Signed-off-by: Effi-S <[email protected]>
323c0b5 to
74e126a
Compare
Signed-off-by: Effi-S <[email protected]>
Signed-off-by: Effi-S <[email protected]>
Type of change
Description
envelope: nil checks + unit tests + minor refactorcrypto: nil checka + unit testsRelated issues