mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-03 16:37:04 +02:00
feat(common): Release version 2.0.0-beta.1 (#173)
This commit is contained in:
parent
19767d668c
commit
7b6ee00be6
189 changed files with 3110 additions and 3023 deletions
154
charts/library/common-test/tests/container/env_test.yaml
Normal file
154
charts/library/common-test/tests/container/env_test.yaml
Normal file
|
@ -0,0 +1,154 @@
|
|||
suite: container env values
|
||||
templates:
|
||||
- common.yaml
|
||||
tests:
|
||||
- it: default should pass
|
||||
asserts:
|
||||
- documentIndex: &DeploymentDoc 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: *DeploymentDoc
|
||||
isNull:
|
||||
path: spec.template.spec.containers[0].env
|
||||
|
||||
- it: KeyValue string should pass
|
||||
set:
|
||||
controllers.main.containers.main.env:
|
||||
string: value_of_env
|
||||
asserts:
|
||||
- documentIndex: &DeploymentDoc 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: *DeploymentDoc
|
||||
equal:
|
||||
path: spec.template.spec.containers[0].env[0]
|
||||
value:
|
||||
name: string
|
||||
value: value_of_env
|
||||
|
||||
- it: KeyValue float should pass
|
||||
set:
|
||||
controllers.main.containers.main.env:
|
||||
string: 4.2
|
||||
asserts:
|
||||
- documentIndex: &DeploymentDoc 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: *DeploymentDoc
|
||||
equal:
|
||||
path: spec.template.spec.containers[0].env[0]
|
||||
value:
|
||||
name: string
|
||||
value: "4.2"
|
||||
|
||||
- it: KeyValue int should pass
|
||||
set:
|
||||
controllers.main.containers.main.env:
|
||||
string: 1
|
||||
asserts:
|
||||
- documentIndex: &DeploymentDoc 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: *DeploymentDoc
|
||||
equal:
|
||||
path: spec.template.spec.containers[0].env[0]
|
||||
value:
|
||||
name: string
|
||||
value: "1"
|
||||
|
||||
- it: List should pass
|
||||
set:
|
||||
controllers.main.containers.main.env:
|
||||
- name: STATIC_ENV_FROM_LIST
|
||||
value: STATIC_ENV_VALUE_FROM_LIST
|
||||
asserts:
|
||||
- documentIndex: &DeploymentDoc 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: *DeploymentDoc
|
||||
equal:
|
||||
path: spec.template.spec.containers[0].env[0]
|
||||
value:
|
||||
name: STATIC_ENV_FROM_LIST
|
||||
value: STATIC_ENV_VALUE_FROM_LIST
|
||||
|
||||
- it: Explicit ValueFrom in list should pass
|
||||
set:
|
||||
controllers.main.containers.main.env:
|
||||
- name: DYNAMIC_ENV_FROM_LIST
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: spec.nodeName
|
||||
asserts:
|
||||
- documentIndex: &DeploymentDoc 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: *DeploymentDoc
|
||||
equal:
|
||||
path: spec.template.spec.containers[0].env[0]
|
||||
value:
|
||||
name: DYNAMIC_ENV_FROM_LIST
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: spec.nodeName
|
||||
|
||||
- it: Implicit ValueFrom should pass
|
||||
set:
|
||||
controllers.main.containers.main.env:
|
||||
DYNAMIC_ENV:
|
||||
fieldRef:
|
||||
fieldPath: spec.nodeName
|
||||
asserts:
|
||||
- documentIndex: &DeploymentDoc 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: *DeploymentDoc
|
||||
equal:
|
||||
path: spec.template.spec.containers[0].env[0]
|
||||
value:
|
||||
name: DYNAMIC_ENV
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: spec.nodeName
|
||||
|
||||
- it: Templated value should pass
|
||||
set:
|
||||
controllers.main.containers.main.env:
|
||||
DYNAMIC_ENV: "{{ .Release.Name }}-admin"
|
||||
asserts:
|
||||
- documentIndex: &DeploymentDoc 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: *DeploymentDoc
|
||||
equal:
|
||||
path: spec.template.spec.containers[0].env[0]
|
||||
value:
|
||||
name: DYNAMIC_ENV
|
||||
value: RELEASE-NAME-admin
|
||||
|
||||
- it: Combined KeyValue with Explicit ValueFrom should pass
|
||||
set:
|
||||
controllers.main.containers.main.env:
|
||||
STATIC_ENV: static
|
||||
DYNAMIC_ENV:
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: spec.nodeName
|
||||
asserts:
|
||||
- documentIndex: &DeploymentDoc 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: *DeploymentDoc
|
||||
equal:
|
||||
path: spec.template.spec.containers[0].env[0]
|
||||
value:
|
||||
name: DYNAMIC_ENV
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: spec.nodeName
|
||||
- documentIndex: *DeploymentDoc
|
||||
equal:
|
||||
path: spec.template.spec.containers[0].env[1]
|
||||
value:
|
||||
name: STATIC_ENV
|
||||
value: static
|
Loading…
Add table
Add a link
Reference in a new issue