mirror of
https://github.com/truecharts/library-charts.git
synced 2026-07-06 04:26:22 -03:00
add some tests
This commit is contained in:
@@ -76,6 +76,36 @@ tests:
|
||||
image: some-repo-additional2:some-tag-additional2
|
||||
imagePullPolicy: IfNotPresent
|
||||
|
||||
- it: should pass with enabled false from tpl defined in additional container
|
||||
documentIndex: *deploymentDoc
|
||||
set:
|
||||
flag: false
|
||||
additionalContainers:
|
||||
some-name:
|
||||
enabled: "{{ .Values.flag }}"
|
||||
tty: true
|
||||
stdin: true
|
||||
asserts:
|
||||
- isNotNull:
|
||||
path: spec.template.spec.containers[0]
|
||||
- isNull:
|
||||
path: spec.template.spec.containers[1]
|
||||
|
||||
- it: should pass with enabled true from tpl defined in additional container
|
||||
documentIndex: *deploymentDoc
|
||||
set:
|
||||
flag: true
|
||||
additionalContainers:
|
||||
some-name:
|
||||
enabled: "{{ .Values.flag }}"
|
||||
tty: true
|
||||
stdin: true
|
||||
asserts:
|
||||
- isNotNull:
|
||||
path: spec.template.spec.containers[0]
|
||||
- isNotNull:
|
||||
path: spec.template.spec.containers[1]
|
||||
|
||||
- it: should pass with tty and stdin defined in additional container
|
||||
documentIndex: *deploymentDoc
|
||||
set:
|
||||
|
||||
@@ -95,6 +95,36 @@ tests:
|
||||
tty: true
|
||||
stdin: true
|
||||
|
||||
- it: should pass with enabled false from tpl defined in init container
|
||||
documentIndex: *deploymentDoc
|
||||
set:
|
||||
flag: false
|
||||
initContainers:
|
||||
some-name:
|
||||
enabled: "{{ .Values.flag }}"
|
||||
tty: true
|
||||
stdin: true
|
||||
asserts:
|
||||
- isNotNull:
|
||||
path: spec.template.spec.containers[0]
|
||||
- isNull:
|
||||
path: spec.template.spec.initContainers[0]
|
||||
|
||||
- it: should pass with enabled true from tpl defined in init container
|
||||
documentIndex: *deploymentDoc
|
||||
set:
|
||||
flag: true
|
||||
initContainers:
|
||||
some-name:
|
||||
enabled: "{{ .Values.flag }}"
|
||||
tty: true
|
||||
stdin: true
|
||||
asserts:
|
||||
- isNotNull:
|
||||
path: spec.template.spec.containers[0]
|
||||
- isNotNull:
|
||||
path: spec.template.spec.initContainers[0]
|
||||
|
||||
- it: should pass with command and args defined in init container
|
||||
documentIndex: *deploymentDoc
|
||||
set:
|
||||
|
||||
@@ -78,6 +78,36 @@ tests:
|
||||
image: some-repo-init2:some-tag-init2
|
||||
imagePullPolicy: IfNotPresent
|
||||
|
||||
- it: should pass with enabled false from tpl defined in init container
|
||||
documentIndex: *deploymentDoc
|
||||
set:
|
||||
flag: false
|
||||
initContainers:
|
||||
some-name:
|
||||
enabled: "{{ .Values.flag }}"
|
||||
tty: true
|
||||
stdin: true
|
||||
asserts:
|
||||
- isNotNull:
|
||||
path: spec.template.spec.containers[0]
|
||||
- isNull:
|
||||
path: spec.template.spec.initContainers[0]
|
||||
|
||||
- it: should pass with enabled true from tpl defined in init container
|
||||
documentIndex: *deploymentDoc
|
||||
set:
|
||||
flag: true
|
||||
initContainers:
|
||||
some-name:
|
||||
enabled: "{{ .Values.flag }}"
|
||||
tty: true
|
||||
stdin: true
|
||||
asserts:
|
||||
- isNotNull:
|
||||
path: spec.template.spec.containers[0]
|
||||
- isNotNull:
|
||||
path: spec.template.spec.initContainers[0]
|
||||
|
||||
- it: should pass with tty and stdin defined in init container
|
||||
documentIndex: *deploymentDoc
|
||||
set:
|
||||
|
||||
@@ -90,6 +90,36 @@ tests:
|
||||
image: some-repo-init:some-tag-init
|
||||
imagePullPolicy: Never
|
||||
|
||||
- it: should pass with enabled false from tpl defined in install container
|
||||
documentIndex: *deploymentDoc
|
||||
set:
|
||||
flag: false
|
||||
installContainers:
|
||||
some-name:
|
||||
enabled: "{{ .Values.flag }}"
|
||||
tty: true
|
||||
stdin: true
|
||||
asserts:
|
||||
- isNotNull:
|
||||
path: spec.template.spec.containers[0]
|
||||
- isNull:
|
||||
path: spec.template.spec.initContainers[0]
|
||||
|
||||
- it: should pass with enabled true from tpl defined in install container
|
||||
documentIndex: *deploymentDoc
|
||||
set:
|
||||
flag: true
|
||||
installContainers:
|
||||
some-name:
|
||||
enabled: "{{ .Values.flag }}"
|
||||
tty: true
|
||||
stdin: true
|
||||
asserts:
|
||||
- isNotNull:
|
||||
path: spec.template.spec.containers[0]
|
||||
- isNotNull:
|
||||
path: spec.template.spec.initContainers[0]
|
||||
|
||||
- it: should pass with tty and stdin defined in install container
|
||||
documentIndex: *deploymentDoc
|
||||
set:
|
||||
|
||||
@@ -76,6 +76,36 @@ tests:
|
||||
image: some-repo-system2:some-tag-system2
|
||||
imagePullPolicy: IfNotPresent
|
||||
|
||||
- it: should pass with enabled false from tpl defined in system container
|
||||
documentIndex: *deploymentDoc
|
||||
set:
|
||||
flag: false
|
||||
systemContainers:
|
||||
some-name:
|
||||
enabled: "{{ .Values.flag }}"
|
||||
tty: true
|
||||
stdin: true
|
||||
asserts:
|
||||
- isNotNull:
|
||||
path: spec.template.spec.containers[0]
|
||||
- isNull:
|
||||
path: spec.template.spec.initContainers[0]
|
||||
|
||||
- it: should pass with enabled true from tpl defined in system container
|
||||
documentIndex: *deploymentDoc
|
||||
set:
|
||||
flag: true
|
||||
systemContainers:
|
||||
some-name:
|
||||
enabled: "{{ .Values.flag }}"
|
||||
tty: true
|
||||
stdin: true
|
||||
asserts:
|
||||
- isNotNull:
|
||||
path: spec.template.spec.containers[0]
|
||||
- isNotNull:
|
||||
path: spec.template.spec.initContainers[0]
|
||||
|
||||
- it: should pass with tty and stdin defined in system container
|
||||
documentIndex: *deploymentDoc
|
||||
set:
|
||||
|
||||
@@ -92,6 +92,36 @@ tests:
|
||||
image: some-repo-init:some-tag-init
|
||||
imagePullPolicy: Never
|
||||
|
||||
- it: should pass with enabled false from tpl defined in upgrade container
|
||||
documentIndex: *deploymentDoc
|
||||
set:
|
||||
flag: false
|
||||
upgradeContainers:
|
||||
some-name:
|
||||
enabled: "{{ .Values.flag }}"
|
||||
tty: true
|
||||
stdin: true
|
||||
asserts:
|
||||
- isNotNull:
|
||||
path: spec.template.spec.containers[0]
|
||||
- isNull:
|
||||
path: spec.template.spec.initContainers[0]
|
||||
|
||||
- it: should pass with enabled true from tpl defined in upgrade container
|
||||
documentIndex: *deploymentDoc
|
||||
set:
|
||||
flag: true
|
||||
upgradeContainers:
|
||||
some-name:
|
||||
enabled: "{{ .Values.flag }}"
|
||||
tty: true
|
||||
stdin: true
|
||||
asserts:
|
||||
- isNotNull:
|
||||
path: spec.template.spec.containers[0]
|
||||
- isNotNull:
|
||||
path: spec.template.spec.initContainers[0]
|
||||
|
||||
- it: should pass with tty and stdin defined in upgrade container
|
||||
documentIndex: *deploymentDoc
|
||||
set:
|
||||
|
||||
Reference in New Issue
Block a user