Ask Your Question
2

What are the steps to reset the firestore emulator in an integration test?

asked 2023-07-13 12:57:47 +0000

nofretete gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2023-07-13 13:05:02 +0000

lalupa gravatar image

The steps to reset the Firestore emulator in an integration test are:

  1. Remove any existing data from the emulator by deleting the emulator data directory.
  2. Restart the emulator.
  3. Initialize the Firestore instance in the integration test.
  4. Load any required test data into the Firestore instance.

To delete the emulator data directory, you can run the following commands:

gcloud beta emulators firestore stop
rm -rf ~/.config/gcloud/emulators/firestore
gcloud beta emulators firestore start

Then, you can initialize the Firestore instance and load test data as needed in your integration test code.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-07-13 12:57:47 +0000

Seen: 13 times

Last updated: Jul 13 '23