Skip to content
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

Set up a testing container for API endpoints with mock PostgreSQL database #110

Open
agennadi opened this issue Dec 3, 2024 · 0 comments

Comments

@agennadi
Copy link
Collaborator

agennadi commented Dec 3, 2024

Context

  • Currently, we lack an isolated environment to reliably test our API endpoints with mock PostgreSQL data. We need to set up a testing container for this purpose.
  • The mock data currently doesn't include Geometry data. We need to find a way to insert Geometry data in the mock database.

Definition of Done

  • The testing container (standard Docker container or Testcontainers) is integrated into the project.
  • Mock data with Geometry columns is successfully loaded.

Engineering Details

  • backend/database/init.sql is a sql script that should be executed to populate a testing db with mock data. This script should be modified to insert data of types Point, Polygon, and Multipolygon.
  • There are two ways to create a testing container: 1) use a standard Docker container; 2) use Testcontainers library to programmatically spin up and tear down a mock PostgreSQL database.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Review
Development

No branches or pull requests

1 participant