Skip to content

Commit

Permalink
chore: ci check
Browse files Browse the repository at this point in the history
  • Loading branch information
paulobressan committed Aug 5, 2024
1 parent 5e87d95 commit 1068b04
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/expect
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,29 @@ while true; do
fi
done

echo "Waiting for rpc to be ready..."
while true; do
pod_status=$(kubectl get pods -n demeter-rpc -o 'jsonpath={.items[*].status.conditions[?(@.type=="Ready")].status}' | grep True)

if [[ -n "$pod_status" ]]; then
break
else
echo "Rpc is not ready yet, waiting..."
sleep 5
fi
done

TOKEN=$(curl --verbose --request POST --url https://dev-dflg0ssi.us.auth0.com/oauth/token --header 'content-type: application/json' --data $TEST_CREDENTIAL | jq -r '.access_token')
echo "token -> $TOKEN"

NODE_IP=$(kubectl get nodes -o jsonpath='{.items[0].status.addresses[?(@.type=="InternalIP")].address}')
echo "NODE_IP -> $NODE_IP"

NAMESPACE=$(./grpcurl -plaintext -vv -H "Authorization: Bearer $TOKEN" -d '{"name": "New Namespace"}' "$NODE_IP":30950 demeter.ops.v1alpha.ProjectService.CreateProject | jq -r '.namespace')

POD_NAME=$(kubectl get pods -n demeter-rpc -o jsonpath='{.items[0].metadata.name}')
kubectl logs -n demeter-rpc $POD_NAME

ATTEMPT=1
MAX_ATTEMPT=120

Expand Down

0 comments on commit 1068b04

Please sign in to comment.