1
0
mirror of https://github.com/xorcare/testing-go-code-with-postgres.git synced 2024-12-24 16:28:34 +02:00
The example suggests a solution to the problem of cleaning the database after running tests and the problem of running tests in parallel. It also shows how to organize integration testing of Go code with Postgres.
Go to file
2023-07-05 01:31:59 +03:00
migrations Publish an example testing go code with Postgres 2023-07-05 01:31:59 +03:00
testingpg Publish an example testing go code with Postgres 2023-07-05 01:31:59 +03:00
.editorconfig Publish an example testing go code with Postgres 2023-07-05 01:31:59 +03:00
.gitignore Publish an example testing go code with Postgres 2023-07-05 01:31:59 +03:00
docker-compose.yml Publish an example testing go code with Postgres 2023-07-05 01:31:59 +03:00
docker-multiple-databases.sh Publish an example testing go code with Postgres 2023-07-05 01:31:59 +03:00
go.mod Publish an example testing go code with Postgres 2023-07-05 01:31:59 +03:00
go.sum Publish an example testing go code with Postgres 2023-07-05 01:31:59 +03:00
LICENSE Initial commit 2023-06-17 16:29:50 +03:00
Makefile Publish an example testing go code with Postgres 2023-07-05 01:31:59 +03:00
README.md Publish an example testing go code with Postgres 2023-07-05 01:31:59 +03:00
user_model.go Publish an example testing go code with Postgres 2023-07-05 01:31:59 +03:00
user_repository_test.go Publish an example testing go code with Postgres 2023-07-05 01:31:59 +03:00
user_repository.go Publish an example testing go code with Postgres 2023-07-05 01:31:59 +03:00

Example of testing Go code with Postgres

The example suggests a solution to the problem of cleaning the database after running tests and the problem of running tests in parallel. It also shows how to organize integration testing of Go code with Postgres.

How to use

Run make test-env-up test and then everything will happen by itself.

Disclaimer

This example is not an example of software architecture!