extract printing tests and add main invocation to tests where I failed to add it

This commit is contained in:
Nikola Jokic
2023-12-04 14:51:38 +01:00
parent 445ef94796
commit c4cee5a195
9 changed files with 174 additions and 57 deletions

View File

@@ -108,3 +108,19 @@ function install_openebs() {
helm repo update
helm install openebs openebs/openebs --namespace openebs --create-namespace
}
function print_results() {
local failed=("$@")
if [[ "${#failed[@]}" -ne 0 ]]; then
echo "----------------------------------"
echo "The following tests failed:"
for test in "${failed[@]}"; do
echo " - ${test}"
done
return 1
else
echo "----------------------------------"
echo "All tests passed!"
fi
}