Skip to content

Add more unit tests #24

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

Merged
merged 3 commits into from
Apr 15, 2025
Merged

Add more unit tests #24

merged 3 commits into from
Apr 15, 2025

Conversation

GrantBirki
Copy link
Member

No description provided.

@Copilot Copilot AI review requested due to automatic review settings April 15, 2025 06:31
Copy link
Contributor

@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 unit tests for the version string formatting and array normalization functions. It introduces changes to allow for build info injection in the version package and adds a new test suite for common utility functions.

  • Added comprehensive unit tests in version_test.go.
  • Modified version.go to enable buildInfoReader mocking.
  • Introduced common_test.go to test the NormalizeArray function.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
internal/version/version_test.go Added tests for various version string scenarios.
internal/version/version.go Refactored buildInfoReader for easier testability.
internal/common/common_test.go New tests for the NormalizeArray utility function.

@GrantBirki GrantBirki merged commit 357d2d7 into main Apr 15, 2025
7 checks passed
@GrantBirki GrantBirki deleted the more-tests branch April 15, 2025 06:32
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