@@ -92,7 +92,6 @@ Run the following commands from the command line to get your local environment s
92
92
``` bash
93
93
$ git clone https://github.com/firebase/firebase-admin-node.git
94
94
$ cd firebase-admin-node # go to the firebase-admin-node directory
95
- $ npm install -g gulp # globally install gulp task runner
96
95
$ npm install # install local npm build / test dependencies
97
96
```
98
97
@@ -137,21 +136,26 @@ you do not already have one. Use a separate, dedicated project for integration t
137
136
test suite makes a large number of writes to the Firebase realtime database. Download the service
138
137
account key file from the "Settings > Service Accounts" page of the project, and copy it to
139
138
` 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:
141
148
142
149
``` bash
143
150
$ npm run integration # Build and run integration test suite
144
151
```
145
152
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:
148
156
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
155
159
```
156
160
157
161
### Repo Organization
0 commit comments