Skip to content

test(doctor,helm): coverage wave 2 (doctor -> 95.6%, helm -> 91.2%) - #270

Merged
saadqbal merged 1 commit into
developfrom
test/coverage-wave2-doctor-helm
Jul 14, 2026
Merged

test(doctor,helm): coverage wave 2 (doctor -> 95.6%, helm -> 91.2%)#270
saadqbal merged 1 commit into
developfrom
test/coverage-wave2-doctor-helm

Conversation

@LukasWodka

@LukasWodkaLukasWodka commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Summary

Wave-2 coverage for doctor + helm (real tests via fake.NewClientset + the fakeRunner seam):

  • doctor: 92.1% → 95.6% ✅ — Status.String (was 0%), nodeReady no-condition arm, getDeployment empty-candidate/missing, jobsManagerEnv valueFrom-skip, findDeployment ambiguous-unknown-release → nil.
  • helm: 86.4% → 91.2% (honest ceiling) — supportsResetThenReuse probe (flag-present + probe-error), repoPresent match/absent, ensureRepo add+update fatal errors, and Upgrade's ensureRepo-failure abort. The remaining uncovered is Upgrade's temp-file defensive I/O (CreateTemp/WriteString/Close errors on a fresh file) + the production exec Runner var — by-construction-uncoverable, left per the ceiling policy.

(nodeboot was already 97.8% — untouched.)

Test plan

  • make ci green. Behavior-asserting; no production changes.

🤖 Generated with Claude Code


Note

Low Risk
Only new unit tests; no runtime or behavioral changes to doctor or helm logic.

Overview
Adds test-only coverage for internal/doctor and internal/helm; production code is unchanged.

Doctor (helpers_coverage_test.go): exercises Status.String, nodeReady (including missing Ready condition), getDeployment (empty candidates and lookup), jobsManagerEnv (literal env vs skipped valueFrom), and findDeployment returning nil when release is unknown and multiple suffix matches exist.

Helm (upgrade_coverage_test.go): uses the existing fakeRunner seam to cover supportsResetThenReuse (flag in help vs probe failure), repoPresent, fatal ensureRepo on add/update failures, and Upgrade aborting when the chart repo cannot be ensured.

Reviewed by Cursor Bugbot for commit fc051ac. Bugbot is set up for automated code reviews on this repo. Configure here.

- doctor -> 95.6% (over 95): Status.String (was 0%); nodeReady no-condition arm;
getDeployment empty-candidate/missing; jobsManagerEnv valueFrom-skip;
findDeployment ambiguous-unknown-release nil.
- helm -> 91.2% (honest ceiling): supportsResetThenReuse probe (flag-present +
probe-error), repoPresent match/absent, ensureRepo add+update fatal errors,
and Upgrade's ensureRepo-failure abort. Remaining uncovered = Upgrade's
temp-file defensive I/O (CreateTemp/WriteString/Close errors) + the production
exec Runner var — by-construction-uncoverable, left per the ceiling policy.
(nodeboot was already 97.8% — untouched.)
make ci green.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@LukasWodkaLukasWodka self-assigned this Jul 14, 2026
@LukasWodka

Copy link
Copy Markdown
ContributorAuthor

bugbot run

@cursorcursorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit fc051ac. Configure here.

@saadqbalsaadqbal left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM 👍 Verified the non-obvious ones — findDeployment returning nil on an ambiguous suffix match (don't guess across releases), jobsManagerEnv skipping valueFrom entries, and Status(99)→"unknown". helm probe/repo error arms driven cleanly via the fake runner. Clean.

@saadqbal
saadqbal merged commit b010f12 into developJul 14, 2026
22 checks passed
@saadqbal
saadqbal deleted the test/coverage-wave2-doctor-helm branch July 14, 2026 10:43
Sign up for freeto 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.

2 participants

@LukasWodka@saadqbal