Skip to content

tighten helm tests - #192

Merged
atkrad merged 2 commits into
mainfrom
tighten-helm-tests
Oct 13, 2026
Merged

atkrad merged 2 commits into
mainfrom
tighten-helm-tests

Conversation

@atkrad

@atkrad atkrad commented Oct 13, 2026

Copy link
Copy Markdown
Member

Summary

  • Cover Helm list, get, delete, history, and rollback: invalid input, a missing release, an unreachable cluster, and whether delete waits for resources.
  • Lock client timeout, debug chart cleanup, install dry-run, a canceled install, and chart-value edges (image digest, args, TLS off, invalid probe durations).
  • Make chart-cache expiry deterministic by backdating the entry instead of waiting on the clock.

Testing principles addressed:

  • Failure paths for invalid input, missing releases, an unreachable cluster, cancellation, and unsupported history.
  • ErrorIs for sentinels, and ErrorContains only when the message is the contract.
  • Determinism, per-test isolation, cleanup of chart directories, and t.Parallel except where a test calls t.Setenv.

Related

Test plan

  • Unit tests added/updated
  • Scenario under scenarios/ (if behavior changes)
  • nix run .#lint / pre-commit clean
  • Manual smoke (command + expected result), if user-facing

go test -race -shuffle=on -count=1 ./internal/helm/ passed.
golangci-lint run ./internal/helm/ reported 0 issues.
Pre-commit hooks passed on the commit.

Remaining

ListReleases, GetRelease, DeleteRelease, GetReleaseHistory, and RollbackRelease accept a context and ignore it. Cancellation of those calls stays untested until the methods honor ctx. That needs a production change, so it is left out of this PR.

Labels

  • One of: kind/feature, kind/bug, kind/docs, kind/chore
  • Add breaking-change if this breaks existing CLI or config behavior
  • Add skip-changelog for internal-only PRs that should not appear in notes

Checklist

  • Title is short and imperative (matches commit style)
  • Docs / CLI help updated when user-facing (README.md, docs/cli/)
  • No secrets or local-only paths in the diff

- cover release list, get, delete, history, and rollback
- lock timeout, debug cleanup, and chart value edges
- drop the wall-clock chart cache expiry wait
@atkrad atkrad added kind/chore Cleanup, deps, CI, or refactor with no user-facing change area/helm Chart render, release, post-render area/testing Scenarios, harness, goldens skip-changelog Exclude this PR from release notes labels Oct 13, 2026
@codecov

codecov Bot commented Oct 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@atkrad atkrad self-assigned this Oct 13, 2026
@atkrad
atkrad merged commit 9b389b2 into main Oct 13, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/helm Chart render, release, post-render area/testing Scenarios, harness, goldens kind/chore Cleanup, deps, CI, or refactor with no user-facing change skip-changelog Exclude this PR from release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant