Skip to content

Commit

Permalink
TEST
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam0Brien committed Nov 21, 2024
1 parent 59a46df commit b7c2acf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
12 changes: 4 additions & 8 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
while true; do
MIGRATE_STATUS=$(kubectl get pods -l job-name=spicedb-cr-migrate -o jsonpath='{.status.containerStatuses[0].ready}')
if [ "$MIGRATE_STATUS" = "Completed" ]; then
echo "SpiceDB migration completed."
Expand All @@ -30,25 +30,22 @@ jobs:
sleep 2
done
for i in {1..300}; do
while true; 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
echo "Zookeeper is running and ready."
exit 0
break
else
echo "Zookeeper is not ready yet. Status: $ZK_STATUS, Ready: $ZK_READY"
fi
sleep 2
done
echo "Timeout reached while waiting for Zookeeper to be ready."
exit 1

- name: View Test Pod Logs
run: |
for i in {1..300}; do
while true; do
STATUS=$(kubectl get pods --selector=job-name=e2e-inventory-http-tests -o jsonpath='{.items[0].status.containerStatuses[0].state.terminated.reason}')
TEST_POD=$(kubectl get pods --selector=job-name=e2e-inventory-http-tests -o jsonpath='{.items[0].metadata.name}')
if [ "$STATUS" = "Completed" ]; then
Expand All @@ -65,7 +62,6 @@ jobs:
sleep 1
done
- name: Inventory Down - Kind Cluster
run: make inventory-down-kind

1 change: 1 addition & 0 deletions deploy/kind/e2e/e2e-batch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ kind: Job
metadata:
name: e2e-inventory-http-tests
spec:
completions: 1
template:
spec:
initContainers:
Expand Down

0 comments on commit b7c2acf

Please sign in to comment.