2023-07-26 01:51:49 +10:00
|
|
|
suite: test migrate annotations
|
|
|
|
|
templates:
|
|
|
|
|
- engine/job-migrate.yaml
|
|
|
|
|
release:
|
|
|
|
|
name: oncall
|
|
|
|
|
tests:
|
|
|
|
|
- it: migrate.useHook=false -> should not provide an annotations block
|
|
|
|
|
set:
|
|
|
|
|
migrate.useHook: false
|
|
|
|
|
asserts:
|
|
|
|
|
- notExists:
|
|
|
|
|
path: metadata.annotations
|
|
|
|
|
|
2023-11-21 18:21:33 +01:00
|
|
|
- it: migrate.useHook=true -> should provide the "helm.sh/hook" annotations
|
2023-07-26 01:51:49 +10:00
|
|
|
set:
|
|
|
|
|
migrate.useHook: true
|
|
|
|
|
asserts:
|
2023-11-21 18:21:33 +01:00
|
|
|
- equal:
|
2023-07-26 01:51:49 +10:00
|
|
|
path: metadata.annotations
|
2023-11-21 18:21:33 +01:00
|
|
|
value:
|
2023-07-26 01:51:49 +10:00
|
|
|
"helm.sh/hook": pre-install,pre-upgrade
|
2023-11-21 18:21:33 +01:00
|
|
|
"helm.sh/hook-weight": "-1"
|
2023-07-26 01:51:49 +10:00
|
|
|
|
|
|
|
|
- it: migrate.useHook=false and annotations set -> should only contain the custom annotations
|
|
|
|
|
set:
|
|
|
|
|
migrate.useHook: false
|
|
|
|
|
migrate.annotations:
|
|
|
|
|
some-annotation: some-value
|
|
|
|
|
other-annotation: other-value
|
|
|
|
|
asserts:
|
2023-11-21 18:21:33 +01:00
|
|
|
- equal:
|
2023-07-26 01:51:49 +10:00
|
|
|
path: metadata.annotations
|
2023-11-21 18:21:33 +01:00
|
|
|
value:
|
2023-07-26 01:51:49 +10:00
|
|
|
some-annotation: some-value
|
|
|
|
|
other-annotation: other-value
|
|
|
|
|
|
2023-08-03 08:35:08 +02:00
|
|
|
- it: >
|
|
|
|
|
migrate.useHook=true and annotations set -> should contain the custom annotations
|
2023-11-21 18:21:33 +01:00
|
|
|
and the "helm.sh/hook" annotations
|
2023-07-26 01:51:49 +10:00
|
|
|
set:
|
|
|
|
|
migrate.useHook: true
|
|
|
|
|
migrate.annotations:
|
|
|
|
|
some-annotation: some-value
|
|
|
|
|
other-annotation: other-value
|
|
|
|
|
asserts:
|
2023-11-21 18:21:33 +01:00
|
|
|
- equal:
|
2023-07-26 01:51:49 +10:00
|
|
|
path: metadata.annotations
|
2023-11-21 18:21:33 +01:00
|
|
|
value:
|
2023-07-26 01:51:49 +10:00
|
|
|
"helm.sh/hook": pre-install,pre-upgrade
|
2023-11-21 18:21:33 +01:00
|
|
|
"helm.sh/hook-weight": "-1"
|
2023-07-26 01:51:49 +10:00
|
|
|
some-annotation: some-value
|
|
|
|
|
other-annotation: other-value
|