1
0
mirror of https://github.com/xorcare/testing-go-code-with-postgres.git synced 2025-06-30 23:23:40 +02:00
Go to file
Vasiliy Vasilyuk 4bb736475b Make a lazy loading for opening a connection
In the current approach, the connection logic is only triggered at the
moment of immediate need for connection.

We also get a single connection opening point.
2023-07-12 22:17:11 +03:00
2023-07-10 23:10:36 +03:00
2023-06-17 16:29:50 +03:00
2023-07-10 23:10:36 +03:00
2023-07-11 23:15:26 +03:00

Example of testing Go code with Postgres

Go workflow status badge codecov Gitlab CI Pipeline Gitlab CI Coverage Go Report Card

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.

What's interesting here?

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!

Description
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.
Readme BSD-3-Clause 339 KiB
Languages
Go 92.6%
Makefile 5%
Shell 2.4%