123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111 |
- suite: secret data test
- templates:
- - common.yaml
- tests:
- - it: should pass with key-value data
- set:
- secret:
- my-secret1:
- enabled: true
- data:
- foo: bar
- asserts:
- - documentIndex: &secretDoc 0
- isKind:
- of: Secret
- - documentIndex: *secretDoc
- equal:
- path: stringData
- value:
- foo: bar
- - documentIndex: *secretDoc
- equal:
- path: type
- value: Opaque
- - it: should pass with custom secret type
- set:
- secret:
- my-secret1:
- enabled: true
- type: SomeCustomType
- data:
- foo: bar
- asserts:
- - documentIndex: *secretDoc
- equal:
- path: type
- value: SomeCustomType
- - it: should pass with key-value data from tpl
- set:
- data: bar
- secret:
- my-secret1:
- enabled: true
- data:
- foo: "{{ .Values.data }}"
- asserts:
- - documentIndex: *secretDoc
- equal:
- path: stringData
- value:
- foo: bar
- - it: should pass with scalar data
- set:
- secret:
- my-secret1:
- enabled: true
- data:
- foo: |
- some multi line
- string text
- asserts:
- - documentIndex: *secretDoc
- equal:
- path: stringData
- value:
- foo: |
- some multi line
- string text
- - it: should pass with scalar data with tpl
- set:
- data: Some other text
- secret:
- my-secret:
- enabled: true
- data:
- foo: |
- file start
- {{ .Values.data }}
- asserts:
- - documentIndex: *secretDoc
- equal:
- path: stringData
- value:
- foo: |
- file start
- Some other text
- - it: should pass with scalar data from tpl
- set:
- data: |
- Some other text
- some_text
- secret:
- my-secret:
- enabled: true
- data:
- foo: |
- {{- .Values.data | nindent 2 }}
- asserts:
- - documentIndex: *secretDoc
- equal:
- path: stringData
- value:
- foo: |
- Some other text
- some_text
|