Skip to content

Commit

Permalink
Update script to print logs on error
Browse files Browse the repository at this point in the history
  • Loading branch information
rpothier committed Jun 9, 2023
1 parent 3358b6f commit 5bed817
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions k8s-ci/k8s_crds/test
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function wait_for_CRD() {
if [[ "$attempt_count" -ge "$max_attempts" ]]; then
echo ""
echo "CRD is not ready after $attempt_count readiness checks at 2 second intervals." >&2
exit 1
return 1
fi
echo -n "."
sleep 2
Expand All @@ -84,7 +84,7 @@ function wait_for_pod() {
if [[ "$attempt_count" -ge "$max_attempts" ]]; then
echo ""
echo "pod is not ready after $attempt_count readiness checks at 2 second intervals." >&2
exit 1
return 1
fi
echo -n "."
sleep 2
Expand All @@ -97,7 +97,7 @@ function wait_for_pod() {
if [[ "$attempt_count" -ge "$max_attempts" ]]; then
echo ""
echo "pod endpoint is not ready after $attempt_count readiness checks at 2 second intervals." >&2
exit 1
return 1
fi
echo -n "."
sleep 2
Expand Down Expand Up @@ -160,12 +160,12 @@ function main() {

# deploy secretless and echo-server
deploy_secretless
wait_for_CRD
wait_for_pod
wait_for_CRD || exit_err "K8s-CRD test: Failed in wait_for_CRD()"
wait_for_pod || exit_err "K8s-CRD test: Failed in wait_for_pod()"

# run test cases
run_test_case "create configuration object" user1 password1
run_test_case "update configuration object" ohnoeswechangedit supersecretpassword
}

main || exit_err "K8s-CRD test: Failed inside main()"
main

0 comments on commit 5bed817

Please sign in to comment.