Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(e2e): add white list for e2e clean script #2622

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions scripts/e2e_test/remove_test_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@
# $2 the host for the pv path

set -x
if [ -f "$HOME"/.config/e2e.config ];then
white_list_array=($(grep white_list "$HOME"/.config/e2e.config | cut -d "=" -f2 | tr ',' ' '))

for ns in "${white_list_array[@]}";do
if [ "$ns" == "$1" ];then
echo "$1 is in white list, skip cleanup"
exit 0
fi
done
else
echo "$HOME/.config/e2e.config does not exist, skip white list check."
fi

helm uninstall "$1" -n "$1" || echo "helm uninstall ns error"
kubectl delete ns "$1" || echo "kubectl delete ns error"
Expand Down
Loading