blob: 9d366e4dadedc49f00ed26de96a52395a98dd5eb [file] [log] [blame]
gio4a9d83d2024-04-14 13:14:40 +04001suite: configmap checksum in deployment
2# Can't use global templates in this test suite as it will break the checksum calculation
3# causing false negative test outcome.
4# templates:
5# - deployment.yaml
6tests:
7 - it: has no checksum/config if no config
8 template: deployment.yaml
9 asserts:
10 - isNull:
11 path: spec.template.metadata.annotations.checksum/config
12 - it: generate checksum/config if config is present
13 template: deployment.yaml
14 set:
15 mountConfig: true
16 configFiles:
17 config.json: "{}"
18 asserts:
19 - isNotNull:
20 path: spec.template.metadata.annotations.checksum/config
21 - matchRegex:
22 path: spec.template.metadata.annotations.checksum/config
23 pattern: "^[a-f0-9]{64}$" # SHA256 hex output