mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 00:47:04 +02:00
feat(common): Release v2.1.0 (#221)
Co-authored-by: Christopher Larivière <lariviere.c@gmail.com>
This commit is contained in:
parent
272dbef383
commit
b360c9885a
18 changed files with 288 additions and 44 deletions
|
@ -154,3 +154,51 @@ tests:
|
|||
value:
|
||||
name: STATIC_ENV
|
||||
value: static
|
||||
|
||||
- it: Env vars with dependsOn should pass
|
||||
set:
|
||||
controllers.main.containers.main.env:
|
||||
STATIC_ENV: 1
|
||||
DYNAMIC_ENV:
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: spec.nodeName
|
||||
dependsOn: STATIC_ENV
|
||||
ORDERED_ENV:
|
||||
value: true
|
||||
dependsOn: STATIC_ENV
|
||||
DEPENDENT_ENV:
|
||||
value: moo_two
|
||||
dependsOn:
|
||||
- DYNAMIC_ENV
|
||||
- ORDERED_ENV
|
||||
asserts:
|
||||
- documentIndex: &DeploymentDoc 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: *DeploymentDoc
|
||||
equal:
|
||||
path: spec.template.spec.containers[0].env[0]
|
||||
value:
|
||||
name: STATIC_ENV
|
||||
value: "1"
|
||||
- documentIndex: *DeploymentDoc
|
||||
equal:
|
||||
path: spec.template.spec.containers[0].env[1]
|
||||
value:
|
||||
name: DYNAMIC_ENV
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: spec.nodeName
|
||||
- documentIndex: *DeploymentDoc
|
||||
equal:
|
||||
path: spec.template.spec.containers[0].env[2]
|
||||
value:
|
||||
name: ORDERED_ENV
|
||||
value: "true"
|
||||
- documentIndex: *DeploymentDoc
|
||||
equal:
|
||||
path: spec.template.spec.containers[0].env[3]
|
||||
value:
|
||||
name: DEPENDENT_ENV
|
||||
value: moo_two
|
||||
|
|
|
@ -71,3 +71,34 @@ tests:
|
|||
- documentIndex: 3
|
||||
isKind:
|
||||
of: Ingress
|
||||
|
||||
- it: multiple with default enabled should pass
|
||||
set:
|
||||
ingress.main.enabled: true
|
||||
ingress.test: {}
|
||||
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 4
|
||||
- documentIndex: 0
|
||||
not: true
|
||||
isKind:
|
||||
of: Ingress
|
||||
- documentIndex: 1
|
||||
not: true
|
||||
isKind:
|
||||
of: Ingress
|
||||
- documentIndex: &FirstIngressDocument 2
|
||||
isKind:
|
||||
of: Ingress
|
||||
- documentIndex: *FirstIngressDocument
|
||||
equal:
|
||||
path: metadata.name
|
||||
value: RELEASE-NAME
|
||||
- documentIndex: &SecondIngressDocument 3
|
||||
isKind:
|
||||
of: Ingress
|
||||
- documentIndex: *SecondIngressDocument
|
||||
equal:
|
||||
path: metadata.name
|
||||
value: RELEASE-NAME-test
|
||||
|
|
|
@ -77,3 +77,20 @@ tests:
|
|||
equal:
|
||||
path: spec.rules[0].http.paths[0].path
|
||||
value: "/RELEASE-NAME.path"
|
||||
|
||||
- it: with defaultBackend should pass
|
||||
set:
|
||||
ingress.main:
|
||||
enabled: true
|
||||
defaultBackend: test
|
||||
asserts:
|
||||
- documentIndex: &IngressDocument 2
|
||||
isKind:
|
||||
of: Ingress
|
||||
- documentIndex: *IngressDocument
|
||||
equal:
|
||||
path: spec.defaultBackend
|
||||
value: test
|
||||
- documentIndex: *IngressDocument
|
||||
notExists:
|
||||
path: spec.rules
|
||||
|
|
|
@ -42,6 +42,24 @@ tests:
|
|||
path: spec.hostnames[0]
|
||||
value: chart-test.local
|
||||
|
||||
- it: custom host with template
|
||||
set:
|
||||
route.main:
|
||||
enabled: true
|
||||
parentRefs:
|
||||
- name: parentName
|
||||
namespace: parentNamespace
|
||||
hostnames:
|
||||
- "{{ .Release.Name }}.local"
|
||||
asserts:
|
||||
- documentIndex: &HTTPRouteDocument 2
|
||||
isKind:
|
||||
of: HTTPRoute
|
||||
- documentIndex: *HTTPRouteDocument
|
||||
equal:
|
||||
path: spec.hostnames[0]
|
||||
value: RELEASE-NAME.local
|
||||
|
||||
- it: path matches should only be used for HTTPRoutes
|
||||
set:
|
||||
route:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue