-
Notifications
You must be signed in to change notification settings - Fork 208
Add manifest tests #1884
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?
Add manifest tests #1884
Conversation
…lob* handlers (oras-project#1861) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: TerryHowe <104113+TerryHowe@users.noreply.github.com> Co-authored-by: shizhMSFT <32161882+shizhMSFT@users.noreply.github.com> Co-authored-by: Terry Howe <terrylhowe@gmail.com> Signed-off-by: ManishhDev <codermanishhh@gmail.com>
…lob* handlers (oras-project#1861) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: TerryHowe <104113+TerryHowe@users.noreply.github.com> Co-authored-by: shizhMSFT <32161882+shizhMSFT@users.noreply.github.com> Co-authored-by: Terry Howe <terrylhowe@gmail.com> Signed-off-by: ManishhDev <codermanishhh@gmail.com>
Signed-off-by: ManishhDev <codermanishhh@gmail.com>
|
Hi, |
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.
LGTM but I am not a maintainer.
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 addresses issue #1863 by adding comprehensive unit test coverage for three previously untested manifest handler modules. The tests verify the core functionality of manifest deletion, index creation, and manifest push operations.
Key Changes:
- Added test coverage for ManifestDeleteHandler with tests for OnManifestMissing and OnManifestDeleted methods
- Added test coverage for ManifestIndexCreateHandler with tests for OnTagged, OnIndexCreated, and Render methods
- Added test coverage for ManifestPushHandler with tests for OnTagged, OnManifestPushed, and Render methods
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| cmd/oras/internal/display/metadata/text/manifest_delete_test.go | Implements unit tests for manifest deletion handler methods and constructor |
| cmd/oras/internal/display/metadata/text/manifest_index_test.go | Implements unit tests for manifest index creation handler methods and constructor |
| cmd/oras/internal/display/metadata/text/manifest_push_test.go | Implements unit tests for manifest push handler methods and constructor |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
Ignore those copilot comments. That looks like the given-when-then pattern to me pretty much. |
|
Something wrong with the build, see the logs, but a sample: |
Fixes #1863
Added unit tests for manifest_delete.go, manifest_index.go and manifest_push.go. These were missing test coverage so I wrote tests covering all the main methods in each handler.
Tests include:
What this PR does / why we need it:
Adds missing test coverage for the manifest handlers to help catch bugs and make the code more reliable.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close the issue(s) when PR gets merged):Fixes #1863
Please check the following list: