@@ -132,16 +132,18 @@ tests.
132
132
Integration tests are executed against a real life Firebase project. If you do not already
133
133
have one suitable for running the tests against, you can create a new project in the
134
134
[ Firebase Console] ( https://console.firebase.google.com ) following the setup guide below.
135
- Otherwise you can obtain the following credentials from your current project:
135
+ If you already have a Firebase project, you'll need to obtain credentials to communicate and
136
+ authorize access to your Firebase project:
136
137
137
-
138
- 1 . Service account certificate: This can be downloaded as a JSON file from the
139
- ** ' Settings > Service Accounts' ** tab of the Firebase console when you click the
140
- ** ' Generate new private key' ** button. Copy the file into the repo so it's available at
138
+ 1 . Service account certificate: This allows access to your Firebase project through a service account
139
+ which is required for all integration tests. This can be downloaded as a JSON file from the
140
+ ** Settings > Service Accounts** tab of the Firebase console when you click the
141
+ ** Generate new private key** button. Copy the file into the repo so it's available at
141
142
` integration_cert.json ` .
142
143
143
144
144
- 2 . Web API key: This is displayed in the ** 'Settings > General'** tab of the Firebase console
145
+ 2 . Web API key: This allows for Auth sign-in needed for some Authentication and Tenant Management
146
+ integration tests. This is displayed in the ** Settings > General** tab of the Firebase console
145
147
after enabling Authentication as described in the steps below. Copy it and save to a new text
146
148
file at ` integration_apikey.txt ` .
147
149
@@ -150,58 +152,58 @@ Set up your Firebase project as follows:
150
152
151
153
152
154
1 . Enable Authentication:
153
- 1 . Go to the Firebase Console, and select ** ' Authentication' ** from the ** ' Build' ** menu.
154
- 2 . Click on ** ' Get Started' ** .
155
- 3 . Select ** ' Sign-in method > Add new provider > Email/Password' ** then enable both the
156
- ** ' Email/Password' ** and ** ' Email link (passwordless sign-in)' ** options.
155
+ 1 . Go to the Firebase Console, and select ** Authentication** from the ** Build** menu.
156
+ 2 . Click on ** Get Started** .
157
+ 3 . Select ** Sign-in method > Add new provider > Email/Password** then enable both the
158
+ ** Email/Password** and ** Email link (passwordless sign-in)** options.
157
159
158
160
159
161
2 . Enable Firestore:
160
- 1 . Go to the Firebase Console, and select ** ' Firestore Database' ** from the ** ' Build' ** menu.
161
- 2 . Click on the ** ' Create database' ** button. You can choose to set up Firestore either in
162
+ 1 . Go to the Firebase Console, and select ** Firestore Database** from the ** Build** menu.
163
+ 2 . Click on the ** Create database** button. You can choose to set up Firestore either in
162
164
the production mode or in the test mode.
163
165
164
166
165
167
3 . Enable Realtime Database:
166
- 1 . Go to the Firebase Console, and select ** ' Realtime Database' ** from the ** ' Build' ** menu.
167
- 2 . Click on the ** ' Create database' ** button. You can choose to set up the Realtime database
168
+ 1 . Go to the Firebase Console, and select ** Realtime Database** from the ** Build** menu.
169
+ 2 . Click on the ** Create Database ** button. You can choose to set up the Realtime Database
168
170
either in the locked mode or in the test mode.
169
- 3 . In the ** ' Data' ** tab click on the kebab menu (3 dots) and select ** ' Create Database' ** .
170
- 4 . Enter your Project ID (Found in the ** ' General' ** tab in ** ' Account Settings' ** ) as the
171
- ** ' Realtime Database reference' ** . Again, you can choose to set up the Realtime database
171
+ 3 . In the ** Data** tab click on the kebab menu (3 dots) and select ** Create Database** .
172
+ 4 . Enter your Project ID (Found in the ** General** tab in ** Account Settings** ) as the
173
+ ** Realtime Database reference** . Again, you can choose to set up the Realtime Database
172
174
either in the locked mode or in the test mode.
173
175
174
176
175
177
4 . Enable Storage:
176
- 1 . Go to the Firebase Console, and select ** ' Storage' ** from the ** ' Build' ** menu.
177
- 2 . Click on the ** ' Get started' ** button. You can choose to set up the Realtime database
178
+ 1 . Go to the Firebase Console, and select ** Storage** from the ** Build** menu.
179
+ 2 . Click on the ** Get started** button. You can choose to set up Cloud Storage
178
180
either in the production mode or in the test mode.
179
181
180
182
181
183
5 . Enable the IAM API:
182
- 1 . Go to the[ Google Cloud Platform Console ] ( https://console.cloud.google.com )
183
- and make sureyour Firebase project is selected.
184
- 2 . Select ** ' APIs & Services' ** from the main menu, and click the
185
- ** ' ENABLE APIS AND SERVICES' ** button.
186
- 3 . Search for and enable ** ' Identity and Access Management (IAM) API' ** by Google Enterprise API.
184
+ 1 . Go to the [ Google Cloud console ] ( https://console.cloud.google.com )
185
+ and make sure your Firebase project is selected.
186
+ 2 . Select ** APIs & Services** from the main menu, and click the
187
+ ** ENABLE APIS AND SERVICES** button.
188
+ 3 . Search for and enable ** Identity and Access Management (IAM) API** by Google Enterprise API.
187
189
188
190
189
191
6 . Enable Tenant Management:
190
192
1 . Go to
191
- [ Google Developers Console | Identity Platform] ( https://console.cloud.google.com/customer-identity/ )
192
- and if it is not already enabled, click ** ' Enable' ** .
193
+ [ Google Cloud console | Identity Platform] ( https://console.cloud.google.com/customer-identity/ )
194
+ and if it is not already enabled, click ** Enable** .
193
195
2 . Then
194
196
[ enable multi-tenancy] ( https://cloud.google.com/identity-platform/docs/multi-tenancy-quickstart#enabling_multi-tenancy )
195
- to enable multi-tenancy .
197
+ for your project .
196
198
197
199
198
- 7 . Ensure your service account has the ** ' Firebase Authentication Admin' ** role. This is required
200
+ 7 . Ensure your service account has the ** Firebase Authentication Admin** role. This is required
199
201
to ensure that exported user records contain the password hashes of the user accounts:
200
- 1 . Go to [ Google Cloud Platform Console / IAM & admin] ( https://console.cloud.google.com/iam-admin ) .
201
- 2 . Find your service account in the list. If not added click the ** ' pencil' ** icon to edit its
202
+ 1 . Go to [ Google Cloud console | IAM & admin] ( https://console.cloud.google.com/iam-admin ) .
203
+ 2 . Find your service account in the list. If not added click the ** pencil** icon to edit its
202
204
permissions.
203
- 3 . Click ** ' ADD ANOTHER ROLE' ** and choose ** ' Firebase Authentication Admin' ** .
204
- 4 . Click ** ' SAVE' ** .
205
+ 3 . Click ** ADD ANOTHER ROLE** and choose ** Firebase Authentication Admin** .
206
+ 4 . Click ** SAVE** .
205
207
206
208
207
209
Now run the following command to invoke the integration test suite:
0 commit comments