You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that the remote datastore must be running before your tests are run. Also note that the `host` argument must start with "http://" or "https://".
41
+
Note that the remote datastore must be running before your tests are run. Also note that the `host` argument must start with "http://" or "https://" if you are testing with a remote machine.
42
42
43
43
44
44
### Testing interactions with Storage
45
45
46
46
There currently isn't an emulator for Google Cloud Storage, so an alternative is to create a test project. `RemoteGcsHelper` contains convenience methods to make setting up and cleaning up the test project easier. To use this class, follow the steps below:
47
47
48
-
1. Create a test Google App Engine project.
48
+
1. Create a test Google Cloud project.
49
49
50
-
2. Create and download a JSON key by going to the Google Developer's Console and clicking API's & Auth > Credentials > Add Credentials > Service Credentials. Choose "JSON", download the file, and note its location.
50
+
2. Create and download a JSON service account credentials file from the Google Developer's Console. See more about this on the [Google Cloud Platform Storage Authentication page][cloud-platform-storage-authentication].
51
51
52
-
3. Set environment variables `GCLOUD_TESTS_PROJECT_ID` and `GCLOUD_TESTS_KEY_PATH` according to your test project's ID and the location of the newly-downloaded JSON key file.
52
+
3. Set environment variables `GCLOUD_TESTS_PROJECT_ID` and `GCLOUD_TESTS_KEY` according to your test project's ID and the location of the newly-downloaded JSON key file. On linux and mac, for example,
53
+
```
54
+
export GCLOUD_TESTS_PROJECT_ID=<project id>
55
+
export GCLOUD_TESTS_KEY=/path/to/JSON/key.json
56
+
```
53
57
54
58
4. Create and and use a `RemoteGcsHelper` object.
55
-
Here is an example that uses the RemoteGcsHelper to create a bucket and clear the bucket at the end of the test.
59
+
Here is an example that uses the `RemoteGcsHelper` to create a bucket and clear the bucket at the end of the test.
0 commit comments