Skip to content

Commit

Permalink
Add charts submodule and test-kong-chart.sh script for regression test
Browse files Browse the repository at this point in the history
  • Loading branch information
jlandowner committed Apr 4, 2024
1 parent c1b9bc6 commit 196c46b
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "hack/test/charts"]
path = hack/test/charts
url = https:/Kong/charts
1 change: 1 addition & 0 deletions hack/test/charts
Submodule charts added at e09fd7
21 changes: 21 additions & 0 deletions hack/test/test-kong-chart.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

# Update submodule to the latest commit
git submodule update --init --recursive

# Loop through each directory in charts/charts and run helm dependency update
for dir in charts/charts/*; do
if [ -d "$dir" ]; then
cd "$dir"
helm dependency update
cd -
fi
done

# Run make test.golden and check return code
make -C charts/ test.golden
if [ $? -eq 0 ]; then
echo "Tests passed successfully."; exit 0
else
echo "Tests failed."; exit 1
fi

0 comments on commit 196c46b

Please sign in to comment.