-
Notifications
You must be signed in to change notification settings - Fork 275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Update integration test project setup instructions. #877
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for sending!
Here are some style things to look at. I think some of them apply to your other, similar doc PRs, so I'll wait on those to see if you can/want to apply the same kinds of fixes in them.
CONTRIBUTING.md
Outdated
Integration tests are executed against a real life Firebase project. If you do not already | ||
have one suitable for running the tests against, you can create a new project in the | ||
[Firebase Console](https://console.firebase.google.com) following the setup guide below. | ||
Otherwise you can obtain the following credentials from your current project: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Otherwise" caught me off guard for a moment.
How about, "If you already have a Firebase project, you'll need to obtain credentials for <whatever they're for>:"
And yeah, what are they for? I'm not 100% clear on how they relate to the various product area setup procedures detailed below. I suspect it has to do with service accounts and Auth, but spelling it out up front could help.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. Something like:
If you already have a Firebase project, you'll need to obtain credentials to communicate and authorize access to your Firebase project.
Do you suggest adding the specific purpose in the sub points below? Something like:
Service account certificate: This allows access to your Firebase project through a service account which is required for all integration tests. This can be downloaded...
Web API key: This allows for Auth sign-in needed for some Authentication and Tenant Management integration tests. This is displayed...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a really good thought! It's good to be brief, but when it comes to credentials or anything security-related, people like to know what's going on and why.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, added those in!
CONTRIBUTING.md
Outdated
|
||
|
||
1. Service account certificate: This can be downloaded as a JSON file from the | ||
**'Settings > Service Accounts'** tab of the Firebase console when you click the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are the single quotes needed here and below? I think just boldface is what we want for UI labels.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have any strong opinions here so we can go with that. To clarify is this for the "UI > UI > UI" labels only or for all the UI like buttons?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm thinking it's for everything; if the ** characters give us boldface, then we don't need the ' characters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
CONTRIBUTING.md
Outdated
3. Enable Realtime Database: | ||
1. Go to the Firebase Console, and select **Realtime Database** from the **Build** menu. | ||
2. Click on the **Create Database** button. You can choose to set up the Realtime Database | ||
either in the locked mode or in the test mode. | ||
3. In the **Data** tab click on the kebab menu (3 dots) and select **Create Database**. | ||
4. Enter your Project ID (Found in the **General** tab in **Account Settings**) as the | ||
**Realtime Database reference**. Again, you can choose to set up the Realtime Database | ||
either in the locked mode or in the test mode. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do what to highlight that this portion is asking to create 2 separate Realtime Databases.
- The first being the default one which has a different naming convention than what is used in our integration tests.
- The second being named using the project id of the firebase project which is the naming convention in our integration tests.
The reason for this is users are not allowed to enter a custom name for their first rtdb and changing the integration test references will break current test projects. This will be confusing so I wondering if I should go into detail here as to why.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely -- I didn't quite gather that from reading the steps (it's possible I was confused because we talk about the a database "ref" value for the targeted part of a path in CF3, but that's not really relevant here).
Yup, I would definitely add some text to clarify that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good thought on clarifying the RTDB situation. After you push that, I should be able to approve, thanks!
CONTRIBUTING.md
Outdated
3. Enable Realtime Database: | ||
1. Go to the Firebase Console, and select **Realtime Database** from the **Build** menu. | ||
2. Click on the **Create Database** button. You can choose to set up the Realtime Database | ||
either in the locked mode or in the test mode. | ||
3. In the **Data** tab click on the kebab menu (3 dots) and select **Create Database**. | ||
4. Enter your Project ID (Found in the **General** tab in **Account Settings**) as the | ||
**Realtime Database reference**. Again, you can choose to set up the Realtime Database | ||
either in the locked mode or in the test mode. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely -- I didn't quite gather that from reading the steps (it's possible I was confused because we talk about the a database "ref" value for the targeted part of a path in CF3, but that's not really relevant here).
Yup, I would definitely add some text to clarify that.
CONTRIBUTING.md
Outdated
@@ -168,6 +168,11 @@ Set up your Firebase project as follows: | |||
1. Go to the Firebase Console, and select **Realtime Database** from the **Build** menu. | |||
2. Click on the **Create Database** button. You can choose to set up the Realtime Database | |||
either in the locked mode or in the test mode. | |||
|
|||
> **Note:** Integration tests are not ran against the default Realtime Database reference and are |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This note works great but needs some nitting from a TW: use "run" instead of "ran", and check the spelling of reference in line 174.
With those nits, LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With my last nit, LG!
Thank you for the review @egilmorez! I'll mirror these changes in the other repos and get them back to you. |
which is required for all integration tests. This can be downloaded as a JSON file from the | ||
**Settings > Service Accounts** tab of the Firebase console when you click the | ||
**Generate new private key** button. Copy the file into the repo so it's available at | ||
`integration_cert.json`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add a line on properly managing service accounts here as we will discourage this practice in the future.
(Service accounts should be carefully managed, Don't submit service account keys to source code repositories)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, added a note under that step. Let me know if that works!
7b4a083
to
ed4029c
Compare
Updated the integration test project setup instructions to be more accurate to the current setup flow.