Skip to content

Commit

Permalink
run test check after pods are booted
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam0Brien committed Nov 20, 2024
1 parent 4b23da4 commit 647bcce
Showing 1 changed file with 15 additions and 17 deletions.
32 changes: 15 additions & 17 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,6 @@ jobs:

- name: Monitor Pods in Kind
run: |
for i in {1..300}; do
STATUS=$(kubectl get pods --selector=job-name=e2e-inventory-http-tests -o jsonpath='{.items[0].status.phase}')
if [ "$STATUS" = "Succeeded" ]; then
echo "Test pod completed successfully."
exit 0
elif [ "$STATUS" = "Failed" ]; then
echo "Test pod failed."
TEST_POD=$(kubectl get pods --selector=job-name=e2e-inventory-http-tests -o jsonpath='{.items[0].metadata.name}')
kubectl logs $TEST_POD
kubectl get pods
exit 1
fi
sleep 1
done
echo "Timeout reached while waiting for the test pod to complete."
exit 1
for i in {1..300}; do
MIGRATE_STATUS=$(kubectl get pods -l job-name=spicedb-cr-migrate -o jsonpath='{.items[0].status.phase}')
Expand Down Expand Up @@ -61,6 +44,21 @@ jobs:
echo "Timeout reached while waiting for Zookeeper to be ready."
exit 1
for i in {1..300}; do
STATUS=$(kubectl get pods --selector=job-name=e2e-inventory-http-tests -o jsonpath='{.items[0].status.phase}')
if [ "$STATUS" = "Succeeded" ]; then
echo "Test pod completed successfully."
exit 0
elif [ "$STATUS" = "Failed" ]; then
echo "Test pod failed."
TEST_POD=$(kubectl get pods --selector=job-name=e2e-inventory-http-tests -o jsonpath='{.items[0].metadata.name}')
kubectl logs $TEST_POD
kubectl get pods
exit 1
fi
sleep 1
done

- name: View Test Pod Logs
Expand Down

0 comments on commit 647bcce

Please sign in to comment.