Skip to content

test(control-plane): cover every imageFromPod and sameRepository branch - #1204

Merged
rh-amarin merged 1 commit into
mainfrom
test/interceptor-image-coverage
Nov 26, 2026
Merged

rh-amarin merged 1 commit into
mainfrom
test/interceptor-image-coverage

Conversation

@rh-amarin

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #1202, which merged before this commit landed. Codecov reported 4 untested lines in the patch.

This PR only adds test cases to TestOwnImagePinsDigestOnlyForTheSpecRepository:

  • a digest with no repository (@sha256:...)
  • an image ID whose repository cannot be parsed
  • a spec image whose name cannot be parsed (kept unchanged)
  • a status entry for another container, which is skipped
  • a pod without the controller container, which is an error

imageFromPod and sameRepository now have 100% coverage. No production code changes.

🤖 Generated with Claude Code

Add cases for a digest with no repository, unparsable image ID and spec
references, a status entry for another container, and a pod without the
controller container, so the patch reaches full coverage.

Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

HyperShell environment destroyed

This ephemeral OpenShift environment has been destroyed. Comment /pr-extend to redeploy it.

@mergify

mergify Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

This pull request is merged.

@codecov-appsre

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@            Coverage Diff             @@
##             main    #1204      +/-   ##
==========================================
+ Coverage   46.95%   46.97%   +0.02%     
==========================================
  Files         474      474              
  Lines       38546    38546              
==========================================
+ Hits        18100    18108       +8     
+ Misses      18309    18305       -4     
+ Partials     2137     2133       -4     
Flag Coverage Δ
control-plane 59.31% <ø> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cb70928...cabc94b. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@rh-amarin
rh-amarin added this pull request to the merge queue Nov 26, 2026
Merged via the queue into main with commit 6c55ae4 Nov 26, 2026
36 of 37 checks passed
@rh-amarin
rh-amarin deleted the test/interceptor-image-coverage branch November 26, 2026 22:23
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.

1 participant