Skip to content

Commit 26a3a3f

Browse files
committed
test: fix verify-helm-chart-index test error
1 parent 1c4bf86 commit 26a3a3f

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

hack/verify-helm-chart-index.sh

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,16 @@ function check_url() {
2525
result=$(curl -I -m 5 -s -w "%{http_code}\n" -o /dev/null $1)
2626
if [ $result -ne 200 ]
2727
then
28-
echo "Error: $1 is fail."
29-
echo "Error: wrong pkg in "${PKG_ROOT}${url#*master}
30-
exit 1
28+
echo "warning: $1 is invalid"
29+
local=${PKG_ROOT}${url#*master}
30+
echo "check whether $local exists"
31+
if [ -f "$local" ]
32+
then
33+
echo "$local exists"
34+
else
35+
echo "$local does not exist"
36+
exit 1
37+
fi
3138
fi
3239
}
3340

@@ -39,6 +46,6 @@ function check_yaml() {
3946
done
4047
}
4148

42-
echo "begin to verify helm chart index ..."
49+
echo "begin to verify all URLs in $INDEX ..."
4350
check_yaml
44-
echo "all url in helm chart index have been checked"
51+
echo "all URLs in $INDEX are valid"

0 commit comments

Comments
 (0)