firebase / firebase-admin-go

Firebase Admin Go SDK
Apache License 2.0
1.13k stars 242 forks source link

feat(rtdb): Support RTDB Emulator via FIREBASE_DATABASE_EMULATOR_HOST #471

Closed kenshin54 closed 2 years ago

kenshin54 commented 2 years ago

Discussion

This PR added the support of RTDB Emulator, discussion is here #298

Testing

I have manually ran the unit tests and integration tests and verified that they pass. Now we can also test them against the emulator by the environment variable FIREBASE_DATABASE_EMULATOR_HOST.

For example:

FIREBASE_DATABASE_EMULATOR_HOST=http://localhost:9000/?ns=foo-default-rtdb go test ./db
FIREBASE_DATABASE_EMULATOR_HOST=http://localhost:9000/?ns=foo-default-rtdb go test ./integration/db

API Changes

No public API changes

wesselvanderlinden commented 2 years ago

:+1:

wesselvanderlinden commented 2 years ago

Can this be looked at? We really need this to be merged :)