|
| 1 | +# yaml-language-server: $schema=https://raw.githubusercontent.com/helm-unittest/helm-unittest/main/schema/helm-testsuite.json |
| 2 | +suite: checksum tests |
| 3 | +templates: |
| 4 | + - event-reporters/**/deployment.yaml |
| 5 | + - event-reporters/**/configmap.yaml |
| 6 | + - argo-gateway/deployment.yaml |
| 7 | + - argo-gateway/configmap.yaml |
| 8 | + - app-proxy/deployment.yaml |
| 9 | + - app-proxy/config.yaml |
| 10 | + - _components/cap-app-proxy/_deployment.yaml |
| 11 | + - _components/cap-app-proxy/_config.yaml |
| 12 | + - codefresh-cm.yaml |
| 13 | +tests: |
| 14 | +- it: default checksum annotations is present |
| 15 | + values: |
| 16 | + - ./values/mandatory-values-ingress.yaml |
| 17 | + asserts: |
| 18 | + - equal: |
| 19 | + path: spec.template.metadata.annotations["checksum/config-argo-gateway"] |
| 20 | + value: ab112b8010e1534e8b45f746764af03ca4e7c9fa5cd0a01f04830e0a6c6e77e1 |
| 21 | + template: argo-gateway/deployment.yaml |
| 22 | + - equal: |
| 23 | + path: spec.template.metadata.annotations["checksum/config-codefresh-cm"] |
| 24 | + value: 4fa7b6b4939725018068441ee7ea7ec594c30d6e58020fdaa89b07ca9515b650 |
| 25 | + template: argo-gateway/deployment.yaml |
| 26 | + - equal: |
| 27 | + path: spec.template.metadata.annotations["checksum/config-event-reporter"] |
| 28 | + value: d016ba2b10b22e24da8854027d4e3fccfe02ee3db4441512ba38a0eb34e124f5 |
| 29 | + template: event-reporters/cluster-event-reporter/deployment.yaml |
| 30 | + - equal: |
| 31 | + path: spec.template.metadata.annotations["checksum/config-codefresh-cm"] |
| 32 | + value: 4fa7b6b4939725018068441ee7ea7ec594c30d6e58020fdaa89b07ca9515b650 |
| 33 | + template: event-reporters/cluster-event-reporter/deployment.yaml |
| 34 | + - equal: |
| 35 | + path: spec.template.metadata.annotations["checksum/config-argocd"] |
| 36 | + value: 4ae1efd920b2b1b83a9b74fabd84defe9869f7c66a444bcfd4ce7dbb5cb846c8 |
| 37 | + template: event-reporters/cluster-event-reporter/deployment.yaml |
| 38 | + - equal: |
| 39 | + path: spec.template.metadata.annotations["checksum/config-cap-app-proxy"] |
| 40 | + value: 8963a9c81220fd8440ccc4e8675be794c83988751fd0d8591c60b2cd3923fbd4 |
| 41 | + template: app-proxy/deployment.yaml |
| 42 | + - equal: |
| 43 | + path: spec.template.metadata.annotations["checksum/config-codefresh-cm"] |
| 44 | + value: 4fa7b6b4939725018068441ee7ea7ec594c30d6e58020fdaa89b07ca9515b650 |
| 45 | + template: app-proxy/deployment.yaml |
| 46 | + |
| 47 | +- it: checksum annotations should change when configmap changes |
| 48 | + template: argo-gateway/deployment.yaml |
| 49 | + set: |
| 50 | + argo-cd.enabled: false |
| 51 | + global.integrations.argo-cd.server.svc: my-argocd-server |
| 52 | + values: |
| 53 | + - ./values/mandatory-values-ingress.yaml |
| 54 | + asserts: |
| 55 | + - equal: |
| 56 | + path: spec.template.metadata.annotations["checksum/config-argo-gateway"] |
| 57 | + value: 89ba18c028caf3aafa73763816296570ec6d82afafa8744419773a4be6d84aff |
| 58 | + template: argo-gateway/deployment.yaml |
| 59 | + - equal: |
| 60 | + path: spec.template.metadata.annotations["checksum/config-codefresh-cm"] |
| 61 | + value: 6fc94d431ae6064fddc76734ec7c66d8b60af02cb22d9b1298e8403a8adcda82 |
| 62 | + template: argo-gateway/deployment.yaml |
| 63 | + - equal: |
| 64 | + path: spec.template.metadata.annotations["checksum/config-event-reporter"] |
| 65 | + value: e76508c530cbb199da90e2dfee0ecb4b6ce79ed86e2b5368c3d670b5ccc9fbe2 |
| 66 | + template: event-reporters/cluster-event-reporter/deployment.yaml |
| 67 | + - equal: |
| 68 | + path: spec.template.metadata.annotations["checksum/config-codefresh-cm"] |
| 69 | + value: 6fc94d431ae6064fddc76734ec7c66d8b60af02cb22d9b1298e8403a8adcda82 |
| 70 | + template: event-reporters/cluster-event-reporter/deployment.yaml |
| 71 | + - equal: |
| 72 | + path: spec.template.metadata.annotations["checksum/config-cap-app-proxy"] |
| 73 | + value: b302ea8929baccb98f9b0086987f76de6e3591e72f356915d951e6a6437611f6 |
| 74 | + template: app-proxy/deployment.yaml |
| 75 | + - equal: |
| 76 | + path: spec.template.metadata.annotations["checksum/config-codefresh-cm"] |
| 77 | + value: 6fc94d431ae6064fddc76734ec7c66d8b60af02cb22d9b1298e8403a8adcda82 |
| 78 | + template: app-proxy/deployment.yaml |
0 commit comments