-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[release-tool] test coverage #10587
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
coutinhop
merged 7 commits into
projectcalico:master
from
radTuti:de-3346-reltool-testing
Jun 24, 2025
Merged
[release-tool] test coverage #10587
coutinhop
merged 7 commits into
projectcalico:master
from
radTuti:de-3346-reltool-testing
Jun 24, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- run tests using gotestsum - publish test results in CI
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 enhances test coverage and refines underlying utility functions for the release tool. Key changes include:
- Addition of unit tests for version determination, component formatting, release notes generation, and image scanning.
- Improvements to error handling, logging, and file output in the image scanner, as well as refinements in CI configuration and Makefile targets.
- Updates to the CI semaphore configuration and .gitignore to support the new test report artifacts.
Reviewed Changes
Copilot reviewed 15 out of 17 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
release/internal/version/version_test.go | Added multiple test cases for version stream and branching logic. |
release/internal/registry/component_test.go | Introduced tests for component string and init image generation. |
release/internal/outputs/templates/release-note.md.gotmpl | Adjusted template formatting for bug fixes and other changes. |
release/internal/outputs/releasenotes_test.go | Added approval tests to verify release notes output. |
release/internal/imagescanner/scanner_test.go | Expanded tests to cover various scanner configurations and HTTP responses. |
release/internal/imagescanner/scanner.go | Refined error handling and ensured proper resource cleanup on scan. |
release/internal/ci/semaphore.go | Updated URL building using url.JoinPath and improved promotion filtering logic. |
release/Makefile | Enhanced unit test target to generate JUnit reports and installed gotestsum. |
release/.gitignore | Added new ignore patterns for test reports and approval test artifacts. |
go.mod | Added dependency for go-approval-tests. |
.semaphore/*.yml | Updated CI configuration to publish unit-test reports. |
Comments suppressed due to low confidence (1)
release/internal/ci/semaphore.go:39
- The local variable 'url' shadows the imported package 'net/url'. Consider renaming the variable (e.g., promotionsURL) to avoid confusion.
url, err := url.JoinPath(orgURL, "promotions")
coutinhop
reviewed
Jun 23, 2025
coutinhop
approved these changes
Jun 23, 2025
- update variables names to be more explict - fix grammar
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
docs-not-required
Docs not required for this change
release-note-not-required
Change has no user-facing impact
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This add unit tests to a couple functions in the release tool.
Related issues/PRs
Todos
Release Note
Reminder for the reviewer
Make sure that this PR has the correct labels and milestone set.
Every PR needs one
docs-*
label.docs-pr-required
: This change requires a change to the documentation that has not been completed yet.docs-completed
: This change has all necessary documentation completed.docs-not-required
: This change has no user-facing impact and requires no docs.Every PR needs one
release-note-*
label.release-note-required
: This PR has user-facing changes. Most PRs should have this label.release-note-not-required
: This PR has no user-facing changes.Other optional labels:
cherry-pick-candidate
: This PR should be cherry-picked to an earlier release. For bug fixes only.needs-operator-pr
: This PR is related to install and requires a corresponding change to the operator.