Files
chart/run_common_tests.sh
2022-11-21 16:27:05 +02:00

20 lines
537 B
Bash
Executable File

#!/bin/bash
# https://github.com/quintush/helm-unittest
# -- You need to install this helm plugin
# helm plugin install https://github.com/quintush/helm-unittest
common_test_path="library/common-test"
if [ -d "$common_test_path/charts" ]; then
echo "Cleaning old built charts..."
rm -r "$common_test_path/charts"
rm "$common_test_path/Chart.lock"
fi
echo "Building common..."
helm dependency update "$common_test_path"
echo "Running tests..."
helm unittest --update-snapshot --helm3 -f "tests/*/*.yaml" "./$common_test_path"