Skip to content

Conversation

@ManishhDev
Copy link
Contributor

Fixes #1867

Added comprehensive unit tests for the TagHandler functionality in cmd/oras/internal/display/metadata/text/tag.go including tests for:

  • NewTagHandler constructor
  • OnTagging method behavior
  • OnTagged method with different tag names
  • Error handling
  • Interface compliance

What this PR does / why we need it:

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 #

Please check the following list:

  • Does the affected code have corresponding tests, e.g. unit test, E2E test?
  • Does this change require a documentation update?
  • Does this introduce breaking changes that would require an announcement or bumping the major version?
  • Do all new files have an appropriate license header?

@TerryHowe
Copy link
Member

DCO issue, you need to git commit --signoff --amend -a; git push --force

@codecov
Copy link

codecov bot commented Oct 22, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.33%. Comparing base (9c99fe1) to head (65bfa38).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1883      +/-   ##
==========================================
+ Coverage   85.30%   85.33%   +0.02%     
==========================================
  Files         143      143              
  Lines        6743     6743              
==========================================
+ Hits         5752     5754       +2     
+ Misses        705      703       -2     
  Partials      286      286              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Fixes oras-project#1867

Added comprehensive unit tests for the TagHandler functionality in cmd/oras/internal/display/metadata/text/tag.go including tests for:
- NewTagHandler constructor
- OnTagging method behavior
- OnTagged method with different tag names
- Error handling
- Interface compliance

Signed-off-by: Manish  <162974418+ManishhDev@users.noreply.github.com>
Signed-off-by: ManishhDev <codermanishhh@gmail.com>
Copy link
Member

@TerryHowe TerryHowe left a comment

Choose a reason for hiding this comment

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

/lgtm

@TerryHowe TerryHowe merged commit 76e2a6d into oras-project:main Oct 23, 2025
8 checks passed
@ManishhDev
Copy link
Contributor Author

Hello @TerryHowe,
Thank you for reviewing and merging my pull request!

I noticed that this repository is currently not participating in Hacktoberfest. To help contributors like me, could you please do one of the following?

Add the hacktoberfest topic to the repository (so all PRs count)

OR add the hacktoberfest-accepted label to this PR

This will make my contribution eligible for Hacktoberfest completion and benefit future contributors!

For more details, please see the Hacktoberfest Participation page or the official docs.

Thank you for supporting open source and the community!

@TerryHowe
Copy link
Member

Done. Thanks for your contribution!

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.

Add test coverage for cmd/oras/internal/display/metadata/text/tag.go

2 participants