Skip to content

Commit

Permalink
chore: Updated helm-unittest to 0.3.6 + made tests compatible (#974)
Browse files Browse the repository at this point in the history
  • Loading branch information
kvanzuijlen authored Dec 20, 2023
1 parent 346df94 commit 255e739
Show file tree
Hide file tree
Showing 27 changed files with 118 additions and 114 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
if: steps.list-changed.outputs.changed == 'true'
run: |
helm env
helm plugin install https://github.com/quintush/helm-unittest --version 0.2.11
helm plugin install https://github.com/helm-unittest/helm-unittest --version 0.3.6
- name: Run chart-testing (lint)
run: ct lint --config ct.yaml
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ Tests can be executed like this:

```console
# install the unittest plugin
$ helm plugin install https://github.com/quintush/helm-unittest --version 0.2.11
$ helm plugin install https://github.com/helm-unittest/helm-unittest --version 0.3.6

# run the unittests
$ helm unittest --helm3 --strict -f 'unittests/*.yaml' charts/jenkins
$ helm unittest --strict -f 'unittests/*.yaml' charts/jenkins

### Chart [ jenkins ] charts/jenkins

Expand Down
4 changes: 4 additions & 0 deletions charts/jenkins/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ Use the following links to reference issues, PRs, and commits prior to v2.6.0.
The changelog until v1.5.7 was auto-generated based on git commits.
Those entries include a reference to the git commit to be able to get more details.

## 4.11.1

Updated helm-unittest and made unittests compatible.

## 4.11.0

Add multi-cloud support.
Expand Down
2 changes: 1 addition & 1 deletion charts/jenkins/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: jenkins
home: https://jenkins.io/
version: 4.11.0
version: 4.11.1
appVersion: 2.426.2
description: Jenkins - Build great things at any scale! The leading open source automation server, Jenkins provides over 1800 plugins to support building, deploying and automating any project.
sources:
Expand Down
2 changes: 1 addition & 1 deletion charts/jenkins/unittests/config-init-scripts-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ tests:
- hasDocuments:
count: 1
- equal:
path: data.inittest\.groovy
path: data["inittest.groovy"]
value: |-
my script here val here
14 changes: 7 additions & 7 deletions charts/jenkins/unittests/config-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ tests:
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: jenkins
- equal:
path: data.apply_config\.sh
path: data["apply_config.sh"]
value: |-
set -e
echo "disable Setup Wizard"
Expand All @@ -38,7 +38,7 @@ tests:
yes n | cp -i /usr/share/jenkins/ref/plugins/* /var/jenkins_plugins/;
echo "finished initialization"
- equal:
path: data.plugins\.txt
path: data["plugins.txt"]
value: |-
kubernetes:4029.v5712230ccb_f8
workflow-aggregator:596.v8c21c963d92d
Expand All @@ -49,7 +49,7 @@ tests:
controller.installPlugins: []
asserts:
- equal:
path: data.apply_config\.sh
path: data["apply_config.sh"]
value: |-
set -e
echo "disable Setup Wizard"
Expand All @@ -58,7 +58,7 @@ tests:
echo $JENKINS_VERSION > /var/jenkins_home/jenkins.install.InstallUtil.lastExecVersion
echo "finished initialization"
- equal:
path: data.plugins\.txt
path: data["plugins.txt"]
value: ""
- it: additional plugins config
set:
Expand All @@ -67,7 +67,7 @@ tests:
- kubernetes-credentials-provider
asserts:
- equal:
path: data.plugins\.txt
path: data["plugins.txt"]
value: |-
kubernetes:4029.v5712230ccb_f8
workflow-aggregator:596.v8c21c963d92d
Expand All @@ -79,7 +79,7 @@ tests:
controller.installLatestPlugins: false
asserts:
- equal:
path: data.apply_config\.sh
path: data["apply_config.sh"]
value: |-
set -e
echo "disable Setup Wizard"
Expand All @@ -105,7 +105,7 @@ tests:
controller.installLatestSpecifiedPlugins: true
asserts:
- equal:
path: data.apply_config\.sh
path: data["apply_config.sh"]
value: |-
set -e
echo "disable Setup Wizard"
Expand Down
2 changes: 1 addition & 1 deletion charts/jenkins/unittests/home-pvc-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ tests:
path: metadata.namespace
value: my-namespace
- matchRegex:
path: metadata.labels.helm\.sh/chart
path: metadata.labels["helm.sh/chart"]
pattern: ^jenkins-
- isNull:
path: metadata.annotations
Expand Down
Loading

0 comments on commit 255e739

Please sign in to comment.