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

Create database mocks for better integration-testing #22

Open
aistein opened this issue Jul 29, 2020 · 0 comments
Open

Create database mocks for better integration-testing #22

aistein opened this issue Jul 29, 2020 · 0 comments
Labels

Comments

@aistein
Copy link
Contributor

aistein commented Jul 29, 2020

As the project grows in size and scope and more collaborators join, the current methods for testing queries against an actual running instance of Postgres will become cumbersome.

We should implement some common mock-functions for the database that can be used to test all API-calls that interact with the database. These shared mock-database functions could be based around the DataDog go-sqlmock library.

An alternative to this would be to use Test Containers
- a framework in which docker containers running dummy instances of the external dependency (e.g. Postgres) are spun up for each integration-test/ test-group.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant