From 3ff411cf9fd03cd7ff4a806fa9f6213d26275075 Mon Sep 17 00:00:00 2001 From: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Date: Mon, 30 Dec 2024 01:35:20 +0200 Subject: [PATCH] chore(ci): make sure renovate won't merge bad updates (#30432) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Description** ⚒️ Fixes # **⚙️ Type of change** - [ ] ⚙️ Feature/App addition - [ ] 🪛 Bugfix - [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] 🔃 Refactor of current code **🧪 How Has This Been Tested?** **📃 Notes:** **✔️ Checklist:** - [ ] ⚖️ My code follows the style guidelines of this project - [ ] 👀 I have performed a self-review of my own code - [ ] #️⃣ I have commented my code, particularly in hard-to-understand areas - [ ] 📄 I have made corresponding changes to the documentation - [ ] ⚠️ My changes generate no new warnings - [ ] 🧪 I have added tests to this description that prove my fix is effective or that my feature works - [ ] ⬆️ I increased versions for any altered app according to semantic versioning - [ ] I made sure the title starts with `feat(chart-name):`, `fix(chart-name):` or `chore(chart-name):` **➕ App addition** If this PR is an app addition please make sure you have done the following. - [ ] 🖼️ I have added an icon in the Chart's root directory called `icon.png` --- _Please don't blindly check all the boxes. Read them and only check those that apply. Those checkboxes are there for the reviewer to see what is this all about and the status of this PR with a quick glance._ --- .../tests/chartContext/image_test.yaml | 142 ++++++++++++++++++ 1 file changed, 142 insertions(+) create mode 100644 charts/library/common-test/tests/chartContext/image_test.yaml diff --git a/charts/library/common-test/tests/chartContext/image_test.yaml b/charts/library/common-test/tests/chartContext/image_test.yaml new file mode 100644 index 00000000000..0cf06ee8bd4 --- /dev/null +++ b/charts/library/common-test/tests/chartContext/image_test.yaml @@ -0,0 +1,142 @@ +suite: image version test +templates: + - common.yaml +release: + name: test-release-name + namespace: test-release-namespace +tests: + - it: should make sure that postgres 15 uses correct image + set: + cnpg: + my-15pg: + enabled: true + user: test-user + database: test-db + password: test-password + pgVersion: 15 + asserts: + - documentIndex: &clusterDoc 0 + isKind: + of: Cluster + - documentIndex: *clusterDoc + equal: + path: metadata.name + value: test-release-name-common-test-cnpg-my-15pg + - documentIndex: *clusterDoc + matchRegex: + path: spec.imageName + pattern: ghcr.io/cloudnative-pg/postgresql:15.\d+ + + - it: should make sure that postgis 15 uses correct image + set: + cnpg: + my-15postgis: + enabled: true + user: test-user + database: test-db + password: test-password + type: postgis + pgVersion: 15 + asserts: + - documentIndex: *clusterDoc + isKind: + of: Cluster + - documentIndex: *clusterDoc + equal: + path: metadata.name + value: test-release-name-common-test-cnpg-my-15postgis + - documentIndex: *clusterDoc + matchRegex: + path: spec.imageName + pattern: ghcr.io/cloudnative-pg/postgis:15.\d+ + + - it: should make sure that vector 15 uses correct image + set: + cnpg: + my-15vector: + enabled: true + user: test-user + database: test-db + password: test-password + type: vectors + pgVersion: 15 + asserts: + - documentIndex: *clusterDoc + isKind: + of: Cluster + - documentIndex: *clusterDoc + equal: + path: metadata.name + value: test-release-name-common-test-cnpg-my-15vector + - documentIndex: *clusterDoc + matchRegex: + path: spec.imageName + pattern: ghcr.io/tensorchord/cloudnative-pgvecto.rs:15.\d+ + + - it: should make sure that postgres 16 uses correct image + set: + cnpg: + my-16pg: + enabled: true + user: test-user + database: test-db + password: test-password + pgVersion: 16 + asserts: + - documentIndex: *clusterDoc + isKind: + of: Cluster + - documentIndex: *clusterDoc + equal: + path: metadata.name + value: test-release-name-common-test-cnpg-my-16pg + - documentIndex: *clusterDoc + matchRegex: + path: spec.imageName + pattern: ghcr.io/cloudnative-pg/postgresql:16.\d+ + + - it: should make sure that postgis 16 uses correct image + set: + cnpg: + my-16postgis: + enabled: true + user: test-user + database: test-db + password: test-password + type: postgis + pgVersion: 16 + asserts: + - documentIndex: *clusterDoc + isKind: + of: Cluster + - documentIndex: *clusterDoc + equal: + path: metadata.name + value: test-release-name-common-test-cnpg-my-16postgis + - documentIndex: *clusterDoc + matchRegex: + path: spec.imageName + pattern: ghcr.io/cloudnative-pg/postgis:16.\d+ + + - it: should make sure that vector 16 uses correct image + set: + cnpg: + my-16vector: + enabled: true + user: test-user + database: test-db + password: test-password + pgVersion: 16 + type: vectors + asserts: + - documentIndex: *clusterDoc + isKind: + of: Cluster + - documentIndex: *clusterDoc + equal: + path: metadata.name + value: test-release-name-common-test-cnpg-my-16vector + - documentIndex: *clusterDoc + matchRegex: + path: spec.imageName + pattern: ghcr.io/tensorchord/cloudnative-pgvecto.rs:16.\d+