Repository navigation
test(application): helm-unittest suite for the application chart (PLATENG-1214) - #24
Merged
Merged
Conversation
Adds suites under charts/application/tests/, one per template area, covering the workload shapes PR #22 introduced (VPA, KEDA, ExternalSecret, TargetGroupBinding, the env model, CronJob batch/v1, PDB, RBAC overrides). Moves ci/*-values.yaml to tests/fixtures/ and wires them into the suites via suite-level values:, plus a matchSnapshot per fixture so any output drift must be reviewed. Also fixes a bug the tests caught: deployment.terminationGracePeriodSeconds and deployment.automountServiceAccountToken rendered as explicit `null` by default because podSpecCommon checked hasKey instead of the value itself (both keys are pre-declared null in values.yaml). Switched to the same kindIs "invalid" check already used for replicas/revisionHistoryLimit/ suspend elsewhere in this chart. Co-authored-by: Claude <noreply@anthropic.com>
…p at tests/fixtures Bumps the PR workflow's Helm to v3.17.1 (lint, dry-run install and package all still pass) so the helm-unittest plugin can be installed, pinned to v1.0.3 since newer releases need Helm 3.18.10+ for their plugin.yaml. Points the existing render/Pluto/kubeconform loop at tests/fixtures/*-values.yaml now that ci/ moved. Documents both in the READMEs and changelog. Co-authored-by: Claude <noreply@anthropic.com>
|
@ryanmcafee Validation Successful |
ryanmcafee
approved these changes
Sep 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
A reviewer on #22 asked whether the new
ci/*-values.yamlfixtures were used by any test suite. They weren't: the stockvalues.yamldisables most templates (deployment is the only thing on by default), so the PR-workflow render/Pluto/kubeconform loop over the fixtures was the only thing exercising VPA, KEDA, ExternalSecret, TargetGroupBinding, the new env model, CronJob'sbatch/v1move, PDB and the RBAC overrides. This converts that into a proper helm-unittest suite.What
charts/application/ci/*-values.yamltocharts/application/tests/fixtures/(content unchanged, already anonymized) and referenced them from suites via suite-levelvalues:.charts/application/tests/, one file per template area (deployment, configmap, cronjob, pdb, service, rbac, vpa, keda, externalsecret, targetgroupbinding, hpa, certificate), plusfixtures_test.yamlwith onematchSnapshotper fixture so any output drift has to be reviewed. 52 tests, 37 snapshotted documents, all passing.deployment.terminationGracePeriodSeconds/automountServiceAccountTokenrendered as explicitnullby default (podSpecCommon checkedhasKeyinstead of the value), instead of being omitted like every other optional field in this chart. Switched to the samekindIs "invalid"check already used forreplicas/revisionHistoryLimit/suspendelsewhere.helm-unittestplugin can install; pinned the plugin to v1.0.3 since newer releases movedplugin.yamlto a schema (platformHooks) that needs Helm 3.18.10+. Added ahelm unittest charts/applicationstep and pointed the existing fixture loop attests/fixtures/*-values.yaml.README.mdandcharts/application/README.md(kept identical) and added a### Unreleasedchangelog entry.How to run
Verified locally:
helm lint,helm unittest(52/52), the fixture render/Pluto/kubeconform loop,helm install --dry-run,helm package, and re-rendering every fixture with a Helm 3.7.0 binary to confirm template compatibility is unchanged.Co-authored-by: Claude noreply@anthropic.com