@@ -92,7 +92,6 @@ Run the following commands from the command line to get your local environment s
9292``` bash
9393$ git clone https://github.com/firebase/firebase-admin-node.git
9494$ cd firebase-admin-node # go to the firebase-admin-node directory
95- $ npm install -g gulp # globally install gulp task runner
9695$ npm install # install local npm build / test dependencies
9796```
9897
@@ -137,21 +136,26 @@ you do not already have one. Use a separate, dedicated project for integration t
137136test suite makes a large number of writes to the Firebase realtime database. Download the service
138137account key file from the "Settings > Service Accounts" page of the project, and copy it to
139138` test/resources/key.json ` . Also obtain the API key for the same project from "Settings > General",
140- and save it to ` test/resources/apikey.txt ` . Finally, to run the integration test suite:
139+ and save it to ` test/resources/apikey.txt ` .
140+
141+ Some Auth integration tests require that you enable the IAM API for your Firebase/GCP project,
142+ and grant your service account ID the "Service Account Token Creator" role. These must be done
143+ via the Google Cloud Console. Refer to the
144+ [ troubleshooting instructions] ( https://firebase.google.com/docs/auth/admin/create-custom-tokens#troubleshooting )
145+ in the official documentation for more details on how to achieve this.
146+
147+ Finally, to run the integration test suite:
141148
142149``` bash
143150$ npm run integration # Build and run integration test suite
144151```
145152
146- The integration test suite overwrites the security rules present in your Firebase project. You
147- will be prompted before the overwrite takes place:
153+ By default the integration test suite does not modify the Firebase security rules for the
154+ Realtime Database. If you want to force update the rules, so that the relevant Database
155+ integration tests can pass, launch the tests as follows:
148156
149- ```
150- Warning: This test will overwrite your project's existing Database rules.
151- Overwrite Database rules for tests?
152- * 'yes' to agree
153- * 'skip' to continue without the overwrite
154- * 'no' to cancel
157+ ``` bash
158+ $ npm run test:integration -- --updateRules
155159```
156160
157161### Repo Organization
0 commit comments