diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index acd09f63..f71c1921 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -31,6 +31,17 @@ jobs: fi sleep 1 done + + 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." + break + elif [ "$MIGRATE_STATUS" = "Failed" ]; then + echo "SpiceDB migration failed." + exit 1 + fi + sleep 2 + done echo "Timeout reached while waiting for the test pod to complete." exit 1