mirror of
https://github.com/truecharts/library-charts.git
synced 2026-07-03 11:24:15 -03:00
**Description** We need to track cnpg major versions and add hooks to, eventually, allow major upgrades. We also need to prevent accidental major version increases at all costs. At the same time, this also requires us to explicitly start referencing containers, after all we need to track versions for said containers. Fixes: #718 Fixes: #719 **⚙️ Type of change** - [x] ⚙️ 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?** <!-- Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration --> **📃 Notes:** Should enable continued work on: https://github.com/truecharts/charts/issues/18737 **✔️ 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 **➕ 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._ --------- Co-authored-by: Stavros kois <s.kois@outlook.com> Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
28 lines
715 B
Bash
Executable File
28 lines
715 B
Bash
Executable File
#!/bin/bash
|
|
# https://github.com/helm-unittest/helm-unittest
|
|
|
|
# -- You need to install this helm plugin
|
|
# helm plugin install https://github.com/helm-unittest/helm-unittest
|
|
|
|
common_test_path="library/common-test"
|
|
|
|
function cleanup {
|
|
if [ -d "$common_test_path/charts" ]; then
|
|
echo "🧹 Cleaning up charts..."
|
|
rm -r "$common_test_path/charts"
|
|
rm "$common_test_path/Chart.lock"
|
|
# Clean snapshots
|
|
rm -r "$common_test_path/**/__snapshot__" 2>/dev/null
|
|
fi
|
|
}
|
|
|
|
cleanup
|
|
|
|
echo "🔨 Building common..."
|
|
helm dependency update "$common_test_path"
|
|
|
|
echo "🧪 Running tests..."
|
|
helm unittest --update-snapshot -f "tests/*/*.yaml" "./$common_test_path" -v ./$common_test_path/unit-values.yaml
|
|
|
|
cleanup
|