helm: add helm-unittest harness for the charts
The charts have no unit tests. CI runs ct lint plus a helm template and kustomize build, which prove the charts render but never assert what they render, so conditional template logic goes unverified. Add helm-unittest, pinned and installed as a standalone binary, a test.helm make target, and a Helm Unittests workflow that runs it. The first suite covers the toolbox deployment: the image composed from the toolbox and cephImage settings, the precedence of both over the older toolbox.image setting, the hostNetwork branch driven by the cluster network provider, and the revisionHistoryLimit guard. The new job is a required check in .mergify.yml, alongside the existing chart linting. Suites live under tests/ in a chart and are excluded from the packaged chart via .helmignore. The runner is invoked with --strict so that a misspelled key fails the suite instead of silently rendering defaults. Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
This commit is contained in:
1 parent
ac0c3b45bc
commit
fa89038264
9 files changed
+202
-1
No files matched your search
@@ -32,4 +32,4 @@ jobs:
|
||||
|
||||
|
||||
- name: Lint the helm charts
|
||||
run: make lint.helm
|
||||
run: make lint.helm
|
||||
@@ -0,0 +1,31 @@
|
||||
name: Helm Unittests
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- v*
|
||||
branches:
|
||||
- master
|
||||
- release-*
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
- release-*
|
||||
|
||||
# cancel the in-progress workflow when PR is refreshed.
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
helm-unittests:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
|
||||
- name: Unit test the helm charts
|
||||
run: make test.helm
|
||||
Reference in new issue
Block a user