feat(common)!: Release v3.0.0-beta1 (#278)

This commit is contained in:
Bernd Schorgers 2024-03-07 19:53:41 +01:00 committed by GitHub
parent deafcf75a1
commit b78483b0b8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
88 changed files with 3697 additions and 1209 deletions

View file

@ -0,0 +1,109 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/helm-unittest/helm-unittest/main/schema/helm-testsuite.json
suite: pod with multiple containers
templates:
- common.yaml
tests:
- it: with explicit name should pass
set:
controllers.main.containers:
additional1:
nameOverride: template-test
dependsOn: main
image:
repository: test
tag: test
asserts:
- documentIndex: 0
isKind:
of: Deployment
- documentIndex: 0
equal:
path: spec.template.spec.containers[1].name
value: template-test
- it: with implicit name should pass
set:
controllers.main.containers:
additional1:
dependsOn: main
image:
repository: test
tag: test
asserts:
- documentIndex: 0
isKind:
of: Deployment
- documentIndex: 0
equal:
path: spec.template.spec.containers[1].name
value: additional1
- it: with templated name should pass
set:
controllers.main.containers:
additional1:
nameOverride: "{{ .Release.Name }}-container"
dependsOn: main
image:
repository: test
tag: test
asserts:
- documentIndex: 0
isKind:
of: Deployment
- documentIndex: 0
equal:
path: spec.template.spec.containers[1].name
value: RELEASE-NAME-container
- it: with custom env vars dict should pass
set:
controllers.main.containers:
main:
env:
main_env: value
additional1:
dependsOn: main
image:
repository: test
tag: test
env:
int: 1
float: 1.5
string: value_of_env
template: "{{ .Release.Name }}-admin"
asserts:
- documentIndex: &DeploymentDocument 0
isKind:
of: Deployment
- documentIndex: *DeploymentDocument
equal:
path: spec.template.spec.containers[0].env[0]
value:
name: main_env
value: "value"
- documentIndex: *DeploymentDocument
equal:
path: spec.template.spec.containers[1].env[0]
value:
name: float
value: "1.5"
- documentIndex: *DeploymentDocument
equal:
path: spec.template.spec.containers[1].env[1]
value:
name: int
value: "1"
- documentIndex: *DeploymentDocument
equal:
path: spec.template.spec.containers[1].env[2]
value:
name: string
value: value_of_env
- documentIndex: *DeploymentDocument
equal:
path: spec.template.spec.containers[1].env[3]
value:
name: template
value: RELEASE-NAME-admin