mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 01:12:56 +03:00
76c322589c
This PR documents & streamlines how we run BigQuery integration tests locally as a first step to [running them in CI](https://github.com/hasura/graphql-engine-mono/issues/1525). I've also created a hasura service account for internal use. [Internal docs here](https://github.com/hasura/graphql-engine-mono/wiki/Testing-BigQuery). Thanks to FP Complete team for [the guidance here](https://docs.google.com/document/d/1dGDK0touUtsDxRQPonMxSoPbIfzBoSYo02tAjQEO7qA/edit?ts=60c0cf24#), which I've reused parts of. https://github.com/hasura/graphql-engine-mono/pull/1732 GitOrigin-RevId: 303819d212aa073fbef685d077b1cfa583cd15fc
10 lines
602 B
Bash
Executable File
10 lines
602 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Suggested usage:
|
|
# https://github.com/hasura/graphql-engine/blob/master/server/CONTRIBUTING.md#running-the-python-test-suite-on-bigquery
|
|
|
|
export YOURPROJECT="<<PROJECT_ID>>"
|
|
export YOURACCOUNT="<<SERVICE_ACCOUNT_NAME>>@<<PROJECT_NAME>>.iam.gserviceaccount.com"
|
|
export YOURAPIKEY="<<API_KEY>>"
|
|
|
|
curl "https://content-bigquery.googleapis.com/bigquery/v2/projects/$YOURPROJECT/queries?alt=json&key=$YOURAPIKEY" --data-binary '{"query":"select 123"}' -H "Authorization: Bearer $(gcloud auth print-access-token $YOURACCOUNT --project=$YOURPROJECT)" -H 'content-type: application/json'
|