Skip to content

Commit

Permalink
fix status checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam0Brien committed Nov 20, 2024
1 parent 647bcce commit 168ade1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Monitor Pods in Kind
run: |
for i in {1..300}; do
for i in {1..50}; do
MIGRATE_STATUS=$(kubectl get pods -l job-name=spicedb-cr-migrate -o jsonpath='{.items[0].status.phase}')
if [ "$MIGRATE_STATUS" = "Completed" ]; then
echo "SpiceDB migration completed."
Expand All @@ -30,7 +30,7 @@ jobs:
sleep 2
done
for i in {1..300}; do
for i in {1..50}; do
ZK_STATUS=$(kubectl get pods my-cluster-zookeeper-0 -o jsonpath='{.status.phase}')
ZK_READY=$(kubectl get pods my-cluster-zookeeper-0 -o jsonpath='{.status.containerStatuses[0].ready}')
if [ "$ZK_STATUS" = "Running" ] && [ "$ZK_READY" = "true" ]; then
Expand All @@ -45,12 +45,12 @@ 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
for i in {1..50}; do
STATUS=$(kubectl get pods --selector=job-name=e2e-inventory-http-tests -o jsonpath='{.items[0].status.containerStatuses[0].state.terminated.reason}')
if [ "$STATUS" = "Completed" ]; then
echo "Test pod completed successfully."
exit 0
elif [ "$STATUS" = "Failed" ]; then
elif [ "$STATUS" = "Error" ]; 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
Expand Down

0 comments on commit 168ade1

Please sign in to comment.