feat: add support for using application default credentials when running integration tests

This commit is contained in:
Chris Hawk 2023-11-09 16:34:51 -08:00
commit bf74697b3f
90 changed files with 856 additions and 793 deletions

View file

@ -40,12 +40,15 @@ for SERVICE in "${SERVICE_LIST[@]}"; do
gcloud services enable "$SERVICE" --project="$PROJECT_ID"
done
for ROLE in "${REQUIRED_ROLE_LIST[@]}"; do
echo "enabling role $ROLE..."
gcloud projects add-iam-policy-binding "$PROJECT_ID" \
--member="serviceAccount:$SERVICE_ACCOUNT_NAME" \
--role="$ROLE"
done
if [ -n "$SERVICE_ACCOUNT_NAME" ]
then
for ROLE in "${REQUIRED_ROLE_LIST[@]}"; do
echo "enabling role $ROLE..."
gcloud projects add-iam-policy-binding "$PROJECT_ID" \
--member="serviceAccount:$SERVICE_ACCOUNT_NAME" \
--role="$ROLE"
done
fi
if ! gcloud app describe --project="$PROJECT_ID" > /dev/null; then
echo "creating appengine project..."