-
Notifications
You must be signed in to change notification settings - Fork 100
Update firebase emulator data and add github action for Android e2e tests #2327
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
base: master
Are you sure you want to change the base?
Update firebase emulator data and add github action for Android e2e tests #2327
Conversation
482c9c4 to
eca4296
Compare
a4cff8e to
feb6b81
Compare
| "auth": { | ||
| "port": 9099 | ||
| }, |
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.
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 you sure it's needed? Isn't auth disabled in the local version? I can't see how it would work today, since we never set up a test account in the auth emulator.
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.
without this the Android app crashes with : com.google.firebase.FirebaseException: An internal error has occurred. [ Failed to connect to /10.0.2.2:9099 ]
The Android app needs FirebaseAuth to initialize successfully when running against the local emulator. For local builds we rely on anonymous sign-in, which still requires the auth emulator to be configured, which currently is done like this:
val auth = FirebaseAuth.getInstance()
if (USE_EMULATORS) {
// Use the auth emulator so we can sign-in anonymously during dev.
auth.useEmulator(EMULATOR_HOST, AUTH_EMULATOR_PORT)
}
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.
Interesting.. I'm surprised it's needed for anonymous sign in. Sure, please re-enable it!
Towards: google/ground-android#3365
To make Android end to end tests reliable and self-contained, we need to pre-populate the Firebase emulator with a dedicated test survey. This PR adds a new folder with this test data
test-androidand a new commandnx start-android-test-datato launch an emulator based on this data.A separate github action was also added in order to run this from the ground-android repo