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://" if you are testing with a remote machine.
41
+
Note that the remote datastore must be running before your tests are run.
42
42
43
43
44
-
### Testing interactions with Storage
44
+
### Testing code that uses Storage
45
45
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:
46
+
Currently, there 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
48
1. Create a test Google Cloud project.
49
49
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].
50
+
2.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` 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
-
```
57
-
58
-
4. Create and and use a `RemoteGcsHelper` object.
52
+
3. Create and use a `RemoteGcsHelper` object using your project ID and JSON key.
59
53
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