diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index dc8a9f29..183bad58 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -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." @@ -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 @@ -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