fix(common): Release v3.0.3 (#291)

Co-authored-by: Gabe Cook <gabe565@gmail.com>
This commit is contained in:
Bernd Schorgers 2024-03-13 14:26:40 +01:00 committed by GitHub
parent a50630fa60
commit 425f4428ab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 164 additions and 33 deletions

View file

@ -0,0 +1,22 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/helm-unittest/helm-unittest/main/schema/helm-testsuite.json
suite: Chart validations
templates:
- common.yaml
tests:
- it: advancedMounts invalid controller reference should fail
set:
persistence:
data:
type: configMap
name: myConfigMap
advancedMounts:
test:
main:
- path: /data/config.yaml
readOnly: false
mountPropagation: HostToContainer
subPath: config.yaml
asserts:
- failedTemplate:
errorMessage: "No enabled controller found with this identifier. (persistence item: 'data', controller: 'test')"

View file

@ -146,6 +146,68 @@ tests:
port: 80
timeoutSeconds: 1
- it: multiple services should pass
set:
controllers:
other:
containers:
main:
image:
repository: ghcr.io/mendhak/http-https-echo
tag: 31
pullPolicy: IfNotPresent
probes:
liveness:
enabled: true
readiness:
enabled: true
startup:
enabled: true
service:
other:
controller: other
ports:
http:
enabled: true
port: &secondDeploymentPort 8080
main:
controller: main
ports:
http:
enabled: true
port: &firstDeploymentPort 80
asserts:
- documentIndex: &firstDeploymentDocument 0
isKind:
of: Deployment
- documentIndex: *firstDeploymentDocument
equal:
path: spec.template.spec.containers[0].livenessProbe.tcpSocket.port
value: *firstDeploymentPort
- documentIndex: *firstDeploymentDocument
equal:
path: spec.template.spec.containers[0].readinessProbe.tcpSocket.port
value: *firstDeploymentPort
- documentIndex: *firstDeploymentDocument
equal:
path: spec.template.spec.containers[0].startupProbe.tcpSocket.port
value: *firstDeploymentPort
- documentIndex: &secondDeploymentDocument 1
isKind:
of: Deployment
- documentIndex: *secondDeploymentDocument
equal:
path: spec.template.spec.containers[0].livenessProbe.tcpSocket.port
value: *secondDeploymentPort
- documentIndex: *secondDeploymentDocument
equal:
path: spec.template.spec.containers[0].readinessProbe.tcpSocket.port
value: *secondDeploymentPort
- documentIndex: *secondDeploymentDocument
equal:
path: spec.template.spec.containers[0].startupProbe.tcpSocket.port
value: *secondDeploymentPort
- it: disabled service should pass
set:
service:

View file

@ -0,0 +1,14 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/helm-unittest/helm-unittest/main/schema/helm-testsuite.json
suite: Service validations
templates:
- common.yaml
tests:
- it: invalid controller reference should fail
set:
service:
main:
controller: other
asserts:
- failedTemplate:
errorMessage: "No enabled controller found with this identifier. (service: 'main', controller: 'other')"