Skip to content

Add Firestore Local Emulator in tests #241

@lakshayman

Description

@lakshayman

Issue Description

Currently, the tests are running against partial mocks, which can lead to inconsistencies and slower test execution. We need to integrate the Firestore Local Emulator into the test environment to ensure tests run reliably and independently of external services.

Expected Behavior

When this issue is resolved:

  • The Firestore Local Emulator will be integrated into the test setup.
  • All tests will use the local emulator to simulate Firestore operations.
  • Tests will run faster and be more reliable, with no dependency on external Firestore services.

Current Behavior

  • Tests are using a live Firestore instance or incomplete mocks.
  • Test results can vary depending on network conditions or data in the live database.
  • Setup and teardown for Firestore-related tests are error-prone and inconsistent.

Reproducibility

  • This issue is reproducible
  • This issue is not reproducible

Severity/Priority

  • Critical
  • High
  • Medium
  • Low

Proposed Solution

  • Add Firestore Local Emulator to the test environment setup.
  • Update test scripts to start and stop the emulator as needed.
  • Refactor existing tests to use the local emulator for Firestore interactions.

Checklist

  • I have read and followed the project's code of conduct.
  • I have searched for similar issues before creating this one.
  • I have provided all the necessary information to understand and reproduce the issue.
  • I am willing to contribute to the resolution of this issue.

Metadata

Metadata

Assignees

Labels

enhancementImproving something existinggoPull requests that update Go codetestsAdds or updates tests

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions