Skip to content

Commit 363fe30

Browse files
authored
docs: add instructions for authenticating for system tests (#872)
* docs: add instructions for authenticating for system tests * docs: add phrasing change to README
1 parent b670a77 commit 363fe30

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

synthtool/gcp/templates/node_library/CONTRIBUTING.md

+13-2
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,15 @@ accept your pull requests.
3737
1. Title your pull request following [Conventional Commits](https://www.conventionalcommits.org/) styling.
3838
1. Submit a pull request.
3939

40+
### Before you begin
41+
42+
1. [Select or create a Cloud Platform project][projects].{% if metadata['repo']['requires_billing'] %}
43+
1. [Enable billing for your project][billing].{% endif %} {% if metadata['repo']['api_id'] %}
44+
1. [Enable the {{ metadata['repo']['name_pretty'] }} API][enable_api]. {% endif %}
45+
1. [Set up authentication with a service account][auth] so you can access the
46+
API from your local workstation.
47+
48+
4049
## Running the tests
4150

4251
1. [Prepare your environment for Node.js setup][setup].
@@ -51,15 +60,17 @@ accept your pull requests.
5160
npm test
5261

5362
# Run sample integration tests.
54-
gcloud auth application-default login
5563
npm run samples-test
5664

5765
# Run all system tests.
58-
gcloud auth application-default login
5966
npm run system-test
6067

6168
1. Lint (and maybe fix) any changes:
6269

6370
npm run fix
6471

6572
[setup]: https://cloud.google.com/nodejs/docs/setup
73+
[projects]: https://console.cloud.google.com/project
74+
[billing]: https://support.google.com/cloud/answer/6293499#enable-billing
75+
{% if metadata['repo']['api_id'] %}[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid={{ metadata['repo']['api_id'] }}{% endif %}
76+
[auth]: https://cloud.google.com/docs/authentication/getting-started

synthtool/gcp/templates/node_library/README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained].
7575
{% if metadata['samples']|length %}
7676
## Samples
7777

78-
Samples are in the [`samples/`](https://github.com/{{ metadata['repo']['repo'] }}/tree/master/samples) directory. The samples' `README.md`
79-
has instructions for running the samples.
78+
Samples are in the [`samples/`](https://github.com/{{ metadata['repo']['repo'] }}/tree/master/samples) directory. Each sample's `README.md` has instructions for running its sample.
8079

8180
| Sample | Source Code | Try it |
8281
| --------------------------- | --------------------------------- | ------ |

0 commit comments

Comments
 (0)