add some tests

This commit is contained in:
Stavros kois
2023-01-17 17:26:21 +02:00
parent 0791907c63
commit 1121091b8a
6 changed files with 180 additions and 0 deletions

View File

@@ -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:

View File

@@ -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:

View File

@@ -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:

View File

@@ -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:

View File

@@ -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:

View File

@@ -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: