You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add tests for the go-template pull metadata handler #2165
#2164 added tests for the rest of the template package (attach, discover, manifest fetch, push, repo ls, repo tags) and brought it from 0% to 85.3%. pull.go is the entire remaining gap — covering it would take the package to roughly 100%.
This handler renders the user-facing output of oras pull --format go-template, so a change in its output is immediately visible to users but is currently caught by nothing.
Suggested coverage
Following the style established in #2164 — assert the rendered bytes, not merely that no error came back:
Render over a template exercising both the reference and the file list. Note it builds the reference as path + "@" + root.Digest.String() unconditionally, so the digest form is worth pinning.
Render with an unparsable template returns an error.
Render with no files pulled, i.e. before any OnFilePulled call.
OnFilePulled for a file with a title annotation and for one without, plus the error path when descPath cannot be resolved.
OnPulled records the root descriptor and ignores the target.
Hi, I’d like to work on this issue. I’ll add focused unit tests for the remaining pull metadata handler paths, keep the change limited to coverage, and open a PR once the tests pass locally. Please let me know if there is any particular behavior you would like covered.
Activity
Soundcreates commentedon Sep 14, 2026
Hi, I’d like to work on this issue. I’ll add focused unit tests for the remaining pull metadata handler paths, keep the change limited to coverage, and open a PR once the tests pass locally. Please let me know if there is any particular behavior you would like covered.