mirror of
https://github.com/truenas/charts.git
synced 2026-06-17 07:27:44 +08:00
split and rename tests
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
suite: deployment container command-arg test
|
||||
suite: container in deployment command-arg test
|
||||
templates:
|
||||
- common.yaml
|
||||
tests:
|
||||
@@ -1,4 +1,4 @@
|
||||
suite: deployment container envFrom test
|
||||
suite: container in deployment envFrom test
|
||||
templates:
|
||||
- common.yaml
|
||||
tests:
|
||||
@@ -1,4 +1,4 @@
|
||||
suite: deployment container env list test
|
||||
suite: container in deployment env list test
|
||||
templates:
|
||||
- common.yaml
|
||||
tests:
|
||||
@@ -1,4 +1,4 @@
|
||||
suite: deployment container env test
|
||||
suite: container in deployment env test
|
||||
templates:
|
||||
- common.yaml
|
||||
tests:
|
||||
@@ -1,4 +1,4 @@
|
||||
suite: deployment container fixed env test
|
||||
suite: container in deployment fixed env test
|
||||
templates:
|
||||
- common.yaml
|
||||
tests:
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
suite: deployment container image test
|
||||
suite: container in deployment image test
|
||||
templates:
|
||||
- common.yaml
|
||||
tests:
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
suite: deployment container lifecycle test
|
||||
suite: container in deployment lifecycle test
|
||||
templates:
|
||||
- common.yaml
|
||||
tests:
|
||||
@@ -165,3 +165,23 @@ tests:
|
||||
asserts:
|
||||
- failedTemplate:
|
||||
errorMessage: No commands were given for postStart lifecycle hook
|
||||
|
||||
- it: should fail with no command in preStop
|
||||
documentIndex: *deploymentDoc
|
||||
set:
|
||||
lifecycle:
|
||||
preStop:
|
||||
command: ""
|
||||
asserts:
|
||||
- failedTemplate:
|
||||
errorMessage: No commands were given for preStop lifecycle hook
|
||||
|
||||
- it: should fail with no command in postStart
|
||||
documentIndex: *deploymentDoc
|
||||
set:
|
||||
lifecycle:
|
||||
postStart:
|
||||
command: ""
|
||||
asserts:
|
||||
- failedTemplate:
|
||||
errorMessage: No commands were given for postStart lifecycle hook
|
||||
@@ -1,4 +1,4 @@
|
||||
suite: deployment container port test
|
||||
suite: container in deployment port test
|
||||
templates:
|
||||
- common.yaml
|
||||
tests:
|
||||
@@ -1,4 +1,4 @@
|
||||
suite: deployment container probe test
|
||||
suite: container in deployment probe test
|
||||
templates:
|
||||
- common.yaml
|
||||
tests:
|
||||
@@ -1,4 +1,4 @@
|
||||
suite: deployment container resources test
|
||||
suite: container in deployment resources test
|
||||
templates:
|
||||
- common.yaml
|
||||
tests:
|
||||
@@ -1,4 +1,4 @@
|
||||
suite: deployment container securityContext test
|
||||
suite: container in deployment securityContext test
|
||||
templates:
|
||||
- common.yaml
|
||||
tests:
|
||||
@@ -0,0 +1,80 @@
|
||||
|
||||
suite: container in deployment various options test
|
||||
templates:
|
||||
- common.yaml
|
||||
tests:
|
||||
- it: should pass with default values
|
||||
documentIndex: &deploymentDoc 0
|
||||
asserts:
|
||||
- isKind:
|
||||
of: Deployment
|
||||
|
||||
- it: should pass with tty set
|
||||
documentIndex: *deploymentDoc
|
||||
set:
|
||||
tty: true
|
||||
asserts:
|
||||
- equal:
|
||||
path: spec.template.spec.containers[0].tty
|
||||
value: true
|
||||
|
||||
- it: should pass with stdin set
|
||||
documentIndex: *deploymentDoc
|
||||
set:
|
||||
stdin: true
|
||||
asserts:
|
||||
- equal:
|
||||
path: spec.template.spec.containers[0].stdin
|
||||
value: true
|
||||
|
||||
- it: should pass with terminationMessagePath set
|
||||
documentIndex: *deploymentDoc
|
||||
set:
|
||||
termination:
|
||||
messagePath: /tmp/log
|
||||
asserts:
|
||||
- equal:
|
||||
path: spec.template.spec.containers[0].terminationMessagePath
|
||||
value: /tmp/log
|
||||
|
||||
- it: should pass with terminationMessagePath set from tpl
|
||||
documentIndex: *deploymentDoc
|
||||
set:
|
||||
some_path: /tmp/log
|
||||
termination:
|
||||
messagePath: "{{ .Values.some_path }}"
|
||||
asserts:
|
||||
- equal:
|
||||
path: spec.template.spec.containers[0].terminationMessagePath
|
||||
value: /tmp/log
|
||||
|
||||
- it: should pass with terminationMessagePolicy set
|
||||
documentIndex: *deploymentDoc
|
||||
set:
|
||||
termination:
|
||||
messagePolicy: FallbackToLogsOnError
|
||||
asserts:
|
||||
- equal:
|
||||
path: spec.template.spec.containers[0].terminationMessagePolicy
|
||||
value: FallbackToLogsOnError
|
||||
|
||||
- it: should pass with terminationMessagePolicy set from tpl
|
||||
documentIndex: *deploymentDoc
|
||||
set:
|
||||
some_key: FallbackToLogsOnError
|
||||
termination:
|
||||
messagePolicy: "{{ .Values.some_key }}"
|
||||
asserts:
|
||||
- equal:
|
||||
path: spec.template.spec.containers[0].terminationMessagePolicy
|
||||
value: FallbackToLogsOnError
|
||||
|
||||
- it: should fail with invalid terminationMessagePolicy
|
||||
documentIndex: *deploymentDoc
|
||||
set:
|
||||
some_key: invalid
|
||||
termination:
|
||||
messagePolicy: "{{ .Values.some_key }}"
|
||||
asserts:
|
||||
- failedTemplate:
|
||||
errorMessage: Not valid option for messagePolicy
|
||||
@@ -1,4 +1,4 @@
|
||||
suite: deployment volumeMount test
|
||||
suite: container in deployment volumeMount test
|
||||
templates:
|
||||
- common.yaml
|
||||
tests:
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
suite: deployment container various options test
|
||||
suite: deployment various options test
|
||||
templates:
|
||||
- common.yaml
|
||||
tests:
|
||||
@@ -9,24 +9,6 @@ tests:
|
||||
- isKind:
|
||||
of: Deployment
|
||||
|
||||
- it: should pass with tty set
|
||||
documentIndex: *deploymentDoc
|
||||
set:
|
||||
tty: true
|
||||
asserts:
|
||||
- equal:
|
||||
path: spec.template.spec.containers[0].tty
|
||||
value: true
|
||||
|
||||
- it: should pass with stdin set
|
||||
documentIndex: *deploymentDoc
|
||||
set:
|
||||
stdin: true
|
||||
asserts:
|
||||
- equal:
|
||||
path: spec.template.spec.containers[0].stdin
|
||||
value: true
|
||||
|
||||
- it: should pass with gracePeriodSeconds set
|
||||
documentIndex: *deploymentDoc
|
||||
set:
|
||||
@@ -75,78 +57,6 @@ tests:
|
||||
path: spec.template.spec.priorityClassName
|
||||
value: some_priority_class_name
|
||||
|
||||
- it: should pass with terminationMessagePath set
|
||||
documentIndex: *deploymentDoc
|
||||
set:
|
||||
termination:
|
||||
messagePath: /tmp/log
|
||||
asserts:
|
||||
- equal:
|
||||
path: spec.template.spec.containers[0].terminationMessagePath
|
||||
value: /tmp/log
|
||||
|
||||
- it: should pass with terminationMessagePath set from tpl
|
||||
documentIndex: *deploymentDoc
|
||||
set:
|
||||
some_path: /tmp/log
|
||||
termination:
|
||||
messagePath: "{{ .Values.some_path }}"
|
||||
asserts:
|
||||
- equal:
|
||||
path: spec.template.spec.containers[0].terminationMessagePath
|
||||
value: /tmp/log
|
||||
|
||||
- it: should pass with terminationMessagePolicy set
|
||||
documentIndex: *deploymentDoc
|
||||
set:
|
||||
termination:
|
||||
messagePolicy: FallbackToLogsOnError
|
||||
asserts:
|
||||
- equal:
|
||||
path: spec.template.spec.containers[0].terminationMessagePolicy
|
||||
value: FallbackToLogsOnError
|
||||
|
||||
- it: should pass with terminationMessagePolicy set from tpl
|
||||
documentIndex: *deploymentDoc
|
||||
set:
|
||||
some_key: FallbackToLogsOnError
|
||||
termination:
|
||||
messagePolicy: "{{ .Values.some_key }}"
|
||||
asserts:
|
||||
- equal:
|
||||
path: spec.template.spec.containers[0].terminationMessagePolicy
|
||||
value: FallbackToLogsOnError
|
||||
|
||||
- it: should fail with invalid terminationMessagePolicy
|
||||
documentIndex: *deploymentDoc
|
||||
set:
|
||||
some_key: invalid
|
||||
termination:
|
||||
messagePolicy: "{{ .Values.some_key }}"
|
||||
asserts:
|
||||
- failedTemplate:
|
||||
errorMessage: Not valid option for messagePolicy
|
||||
|
||||
- it: should fail with no command in preStop
|
||||
documentIndex: *deploymentDoc
|
||||
set:
|
||||
lifecycle:
|
||||
preStop:
|
||||
command: ""
|
||||
asserts:
|
||||
- failedTemplate:
|
||||
errorMessage: No commands were given for preStop lifecycle hook
|
||||
|
||||
- it: should fail with no command in postStart
|
||||
documentIndex: *deploymentDoc
|
||||
set:
|
||||
lifecycle:
|
||||
postStart:
|
||||
command: ""
|
||||
asserts:
|
||||
- failedTemplate:
|
||||
errorMessage: No commands were given for postStart lifecycle hook
|
||||
|
||||
- it: should fail with no value in a key in nodeSelector
|
||||
documentIndex: *deploymentDoc
|
||||
set:
|
||||
Reference in New Issue
Block a user