123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- suite: secret validation test
- templates:
- - common.yaml
- tests:
- - it: should fail with name longer than 63 characters
- set:
- secret:
- my-secret-super-long-name-that-is-longer-than-63-characters:
- enabled: true
- data:
- foo: bar
- asserts:
- - failedTemplate:
- errorMessage: Name [release-name-common-test-my-secret-super-long-name-that-is-longer-than-63-characters] is not valid. Must start and end with an alphanumeric lowercase character. It can contain '-'. And must be at most 63 characters.
- - it: should fail with name starting with underscore
- set:
- secret:
- _my-secret:
- enabled: true
- data:
- foo: bar
- asserts:
- - failedTemplate:
- errorMessage: Name [release-name-common-test-_my-secret] is not valid. Must start and end with an alphanumeric lowercase character. It can contain '-'. And must be at most 63 characters.
- - it: should fail with labels not a dict
- set:
- secret:
- my-secret:
- enabled: true
- labels: "not a dict"
- data:
- foo: bar
- asserts:
- - failedTemplate:
- errorMessage: Secret - Expected <labels> to be a dictionary, but got [string]
- - it: should fail with annotations not a dict
- set:
- secret:
- my-secret:
- enabled: true
- annotations: "not a dict"
- data:
- foo: bar
- asserts:
- - failedTemplate:
- errorMessage: Secret - Expected <annotations> to be a dictionary, but got [string]
- - it: should fail with data not a dict
- set:
- secret:
- my-secret:
- enabled: true
- data: "not a dict"
- asserts:
- - failedTemplate:
- errorMessage: Secret - Expected <data> to be a dictionary, but got [string]
- - it: should fail with empty data
- set:
- secret:
- my-secret:
- enabled: true
- data: {}
- asserts:
- - failedTemplate:
- errorMessage: Secret - Expected non-empty <data>
- - it: should fail with empty type key
- set:
- secret:
- my-secret:
- enabled: true
- type: ""
- data:
- foo: bar
- asserts:
- - failedTemplate:
- errorMessage: Secret - Found <type> key, but it's empty
|