Skip to content

test(display): cover the pull metadata handler - #2168

Merged
TerryHowe merged 3 commits into
oras-project:mainfrom
Soundcreates:test/pull-metadata-handler-coverage
Sep 18, 2026
Merged

TerryHowe merged 3 commits into
oras-project:mainfrom
Soundcreates:test/pull-metadata-handler-coverage

Conversation

@Soundcreates

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

Adds focused unit tests for the go-template pull metadata handler. The tests pin the digest-form reference and rendered pulled-file metadata, cover empty pulls and unparsable templates, verify title and title-less descriptors, ensure the target is ignored by OnPulled, and exercise OnLayerSkipped.

Which issue(s) this PR fixes (optional, in fixes #<issue number> format, will close issue(s) when PR gets merged):
Fixes #2165

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?

Signed-off-by: Shantanav Mukherjee <[email protected]>
@codecov

codecov Bot commented Sep 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.81%. Comparing base (d1c4808) to head (3138d14).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2168      +/-   ##
==========================================
+ Coverage   87.71%   87.81%   +0.10%     
==========================================
  Files         139      139              
  Lines        5689     5689              
==========================================
+ Hits         4990     4996       +6     
+ Misses        419      413       -6     
  Partials      280      280              

☔ View full report in Codecov by Harness.
📢 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.

@TerryHowe TerryHowe left a comment

Copy link
Copy Markdown
Member

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 27c2d04 into oras-project:main Sep 18, 2026
9 checks passed
@TerryHowe

Copy link
Copy Markdown
Member

Thanks!

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 tests for the go-template pull metadata handler

2 participants