-
Notifications
You must be signed in to change notification settings - Fork 285
Added FCM Root URL in FirebaseOptions #803
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
Added FCM Root URL in FirebaseOptions #803
Conversation
@lahirumaramba @dwyfrequency @kroikie Can anyone please review? |
@wu-hui Can you please review the PR or add the respective reviewer? |
Hi @yashjain12yj, thank you for the FR and the PR! |
Hey @lahirumaramba, Thanks for responding
While writing functional tests/Service level tests, we do mock all the external services and create mock servers which behaves the same as external service. So here in case of sending push notifications, we are using Firebase admin SDK and to write FTs for this use-case, we would need to mock the FCM server with a mock server created in FTs. Let me explain this with the help of an example. Here, Suppose we are writing FTs for Service 1. It exposes a GET API to get some data. The data contains multiple attributes few attributes from DB, a few from the cache, and a few from Service 2(HTTP API). While setting up the FT we will create a DB, cache server, and a mock HTTP server. Once the server is up, we want Service 1 to point to these servers instead of actual hosts. Since the DB, cache, and mock HTTP server are running in the same machine on different ports. We would want to set the Host to localhost with respective ports. Now in the case of Firebase admin SDK, the host is hardcoded in the library. Hence, we are not able to override the Host to localhost. I hope this gives clarity. Let me know if you need to understand this more in detail. Also, please do suggest if there is any alternate way of achieving this :) |
…cm_root_url_from_option
@lahirumaramba Could you please check this? |
@lahirumaramba Could you please check this? It's been open from a long time. |
@ lahirumaramba |
I've ran into this issue aswell and implemented a solution using reflection as this won't be implemented any time soon it seems. Please look here on how I fixed it: #802 (comment) |
Hello @lahirumaramba, I wanted to kindly request if you could take a look at this PR, as it is crucial for our integration tests. Our team is currently blocked. Thank you for considering this request. |
Summary
Added FCM root URL in
FirebaseOptions
so that while constructing theFirebaseApp
object,fcmRootUrl
can be passed. This will help in changing the base URL to localhost while writing FTs(Functional Tests).Open Issue: #802