diff --git a/TESTING.md b/TESTING.md index 935b9c4d8f1..10cca80ead7 100644 --- a/TESTING.md +++ b/TESTING.md @@ -32,11 +32,14 @@ The script will also instruct you to follow a URL to enable APIs. You will need From the Cloud Console, create a new Service Account and download its json key. Place this file in `testing/resources/service-account.json`. +Create a new OAuth client ID. Create a file `testing/resources/client-secrets.json` and write the `client_id` and `client_secret` to the file in the [Client Secrets JSON format](https://developers.google.com/api-client-library/python/guide/aaa_client_secrets). + ## Environment variables * Copy `testing/resources/test-env.tmpl.sh` to `testing/resources/test-env.sh`, and updated it with your configuration. * Run `source testing/resources/test-env.sh`. * Run `export GOOGLE_APPLICATION_CREDENTIALS=testing/resources/service-account.json`. +* Run `export GOOGLE_CLIENT_SECRETS=testing/resources/client-secrets.json`. ### Test environments diff --git a/scripts/prepare-testing-project.sh b/scripts/prepare-testing-project.sh index 1b62ea0f7f8..fafcf89eae1 100755 --- a/scripts/prepare-testing-project.sh +++ b/scripts/prepare-testing-project.sh @@ -25,11 +25,11 @@ gsutil defacl set public-read gs://$GCLOUD_PROJECT echo "Creating bigquery resources." gcloud alpha bigquery datasets create test_dataset gcloud alpha bigquery datasets create ephemeral_test_dataset -gsutil cp tests/resources/data.csv gs://$GCLOUD_PROJECT/data.csv +gsutil cp bigquery/api/resources/data.csv gs://$GCLOUD_PROJECT/data.csv gcloud alpha bigquery import \ gs://$GCLOUD_PROJECT/data.csv \ test_dataset/test_table \ - --schema-file tests/resources/schema.json + --schema-file bigquery/api/resources/schema.json echo "Creating datastore indexes." gcloud preview app deploy -q datastore/api/index.yaml @@ -38,4 +38,4 @@ echo "Creating pubsub resources." gcloud alpha pubsub topics create gae-mvm-pubsub-topic echo "To finish setup, follow this link to enable APIs." -echo "https://console.cloud.google.com/flows/enableapi?apiid=datastore,pubsub,storage_api,logging,plus,bigquery,cloudmonitoring,compute_component" +echo "https://console.cloud.google.com/flows/enableapi?project=${GCLOUD_PROJECT}&apiid=bigquery,cloudmonitoring,compute_component,datastore,datastore.googleapis.com,dataproc,dns,plus,pubsub,logging,storage_api,vision.googleapis.com"