Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions scripts/prepare-testing-project.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"