Skip to content

Commit 9548af3

Browse files
committed
mirror Tech Writer review changes
1 parent e90e2ad commit 9548af3

File tree

1 file changed

+45
-38
lines changed

1 file changed

+45
-38
lines changed

CONTRIBUTING.md

Lines changed: 45 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -163,19 +163,21 @@ pytest --cov=firebase_admin --cov=tests
163163
### Integration Testing
164164

165165

166-
A suite of integration tests are available under the `integration/` directory. These tests
167-
are designed to run against an actual Firebase project. If you do not already have one
168-
suitable for running the tests against, you can create a new project in the
166+
Integration tests are executed against a real life Firebase project. If you do not already
167+
have one suitable for running the tests against, you can create a new project in the
169168
[Firebase Console](https://console.firebase.google.com) following the setup guide below.
170-
Otherwise you can obtain the following credentials from your current project:
169+
If you already have a Firebase project, you'll need to obtain credentials to communicate and
170+
authorize access to your Firebase project:
171171

172172

173-
1. Service account certificate: This can be downloaded as a JSON file from the
174-
**'Settings > Service Accounts'** tab of the Firebase console when you click the
175-
**'Generate new private key'** button. Copy the file into the repo so it's available at `cert.json`.
173+
1. Service account certificate: This allows access to your Firebase project through a service account
174+
which is required for all integration tests. This can be downloaded as a JSON file from the
175+
**Settings > Service Accounts** tab of the Firebase console when you click the
176+
**Generate new private key** button. Copy the file into the repo so it's available at `cert.json`.
176177

177178

178-
2. Web API key: This is displayed in the **'Settings > General'** tab of the Firebase console
179+
2. Web API key: This allows for Auth sign-in needed for some Authentication and Tenant Management
180+
integration tests. This is displayed in the **Settings > General** tab of the Firebase console
179181
after enabling Authentication as described in the steps below. Copy it and save to a new text
180182
file at `apikey.txt`.
181183

@@ -184,65 +186,70 @@ Set up your Firebase project as follows:
184186

185187

186188
1. Enable Authentication:
187-
1. Go to the Firebase Console, and select **'Authentication'** from the **'Build'** menu.
188-
2. Click on **'Get Started'**.
189-
3. Select **'Sign-in method > Add new provider > Email/Password'** then enable both the
190-
**'Email/Password'** and **'Email link (passwordless sign-in)'** options.
189+
1. Go to the Firebase Console, and select **Authentication** from the **Build** menu.
190+
2. Click on **Get Started**.
191+
3. Select **Sign-in method > Add new provider > Email/Password** then enable both the
192+
**Email/Password** and **Email link (passwordless sign-in)** options.
191193

192194

193195
2. Enable Firestore:
194-
1. Go to the Firebase Console, and select **'Firestore Database'** from the **'Build'** menu.
195-
2. Click on the **'Create database'** button. You can choose to set up Firestore either in
196+
1. Go to the Firebase Console, and select **Firestore Database** from the **Build** menu.
197+
2. Click on the **Create database** button. You can choose to set up Firestore either in
196198
the production mode or in the test mode.
197199

198200

199201
3. Enable Realtime Database:
200-
1. Go to the Firebase Console, and select **'Realtime Database'** from the **'Build'** menu.
201-
2. Click on the **'Create database'** button. You can choose to set up the Realtime database
202+
1. Go to the Firebase Console, and select **Realtime Database** from the **Build** menu.
203+
2. Click on the **Create Database** button. You can choose to set up the Realtime Database
202204
either in the locked mode or in the test mode.
203-
3. In the **'Data'** tab click on the kebab menu (3 dots) and select **'Create Database'**.
204-
4. Enter your Project ID (Found in the **'General'** tab in **'Account Settings'**) as the
205-
**'Realtime Database reference'**. Again, you can choose to set up the Realtime database
205+
206+
> **Note:** Integration tests are not run against the default Realtime Database reference and are
207+
instead run against a database created at `https://{PROJECT_ID}.firebaseio.com`.
208+
This second Realtime Database reference is created in the following steps.
209+
210+
3. In the **Data** tab click on the kebab menu (3 dots) and select **Create Database**.
211+
4. Enter your Project ID (Found in the **General** tab in **Account Settings**) as the
212+
**Realtime Database reference**. Again, you can choose to set up the Realtime Database
206213
either in the locked mode or in the test mode.
207214

208215

209216
4. Enable Storage:
210-
1. Go to the Firebase Console, and select **'Storage'** from the **'Build'** menu.
211-
2. Click on the **'Get started'** button. You can choose to set up the Realtime database
217+
1. Go to the Firebase Console, and select **Storage** from the **Build** menu.
218+
2. Click on the **Get started** button. You can choose to set up Cloud Storage
212219
either in the production mode or in the test mode.
213220

214221

215222
5. Enable the Firebase ML API:
216223
1. Go to the
217-
[Google Developers Console | Firebase ML API](https://console.developers.google.com/apis/api/firebaseml.googleapis.com/overview)
224+
[Google Cloud console | Firebase ML API](https://console.cloud.google.com/apis/api/firebaseml.googleapis.com/overview)
218225
and make sure your project is selected.
219-
2. If the API is not already enabled, click **'Enable'**.
226+
2. If the API is not already enabled, click **Enable**.
220227

221228

222229
6. Enable the IAM API:
223-
1. Go to the[Google Cloud Platform Console](https://console.cloud.google.com)
224-
and make sureyour Firebase project is selected.
225-
2. Select **'APIs & Services'** from the main menu, and click the
226-
**'ENABLE APIS AND SERVICES'** button.
227-
3. Search for and enable **'Identity and Access Management (IAM) API'** by Google Enterprise API.
230+
1. Go to the [Google Cloud console](https://console.cloud.google.com)
231+
and make sure your Firebase project is selected.
232+
2. Select **APIs & Services** from the main menu, and click the
233+
**ENABLE APIS AND SERVICES** button.
234+
3. Search for and enable **Identity and Access Management (IAM) API** by Google Enterprise API.
228235

229236

230237
7. Enable Tenant Management:
231238
1. Go to
232-
[Google Developers Console | Identity Platform](https://console.cloud.google.com/customer-identity/)
233-
and if it is not already enabled, click **'Enable'**.
234-
2. Then follow
235-
[this guide](https://cloud.google.com/identity-platform/docs/multi-tenancy-quickstart#enabling_multi-tenancy)
236-
to enable multi-tenancy.
239+
[Google Cloud console | Identity Platform](https://console.cloud.google.com/customer-identity/)
240+
and if it is not already enabled, click **Enable**.
241+
2. Then
242+
[enable multi-tenancy](https://cloud.google.com/identity-platform/docs/multi-tenancy-quickstart#enabling_multi-tenancy)
243+
for your project.
237244

238245

239-
8. Ensure your service account has the **'Firebase Authentication Admin'** role. This is required
246+
8. Ensure your service account has the **Firebase Authentication Admin** role. This is required
240247
to ensure that exported user records contain the password hashes of the user accounts:
241-
1. Go to [Google Cloud Platform Console / IAM & admin](https://console.cloud.google.com/iam-admin).
242-
2. Find your service account in the list. If not added click the **'pencil'** icon to edit its
248+
1. Go to [Google Cloud console | IAM & admin](https://console.cloud.google.com/iam-admin).
249+
2. Find your service account in the list. If not added click the **pencil** icon to edit its
243250
permissions.
244-
3. Click **'ADD ANOTHER ROLE'** and choose **'Firebase Authentication Admin'**.
245-
4. Click **'SAVE'**.
251+
3. Click **ADD ANOTHER ROLE** and choose **Firebase Authentication Admin**.
252+
4. Click **SAVE**.
246253

247254

248255
Now you can invoke the integration test suite as follows:

0 commit comments

Comments
 (0)