Skip to content

Conversation

Effi-S
Copy link
Contributor

@Effi-S Effi-S commented Aug 6, 2025

Copyright IBM Corp. All Rights Reserved.

SPDX-License-Identifier: Apache-2.0

  • Test update
  1. envelope wrapper: nil check + unit tests + minor refactor
  2. crypto: nil check + unit tests

See: Issue 11

@Effi-S Effi-S requested a review from liran-funaro August 7, 2025 08:49
return nil, nil, err
}

if payload.Header == nil {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Graceful failure

@cendhu cendhu requested a review from Copilot August 7, 2025 10:32
Copy link

@Copilot Copilot AI left a 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant