1
0
mirror of https://github.com/xorcare/testing-go-code-with-postgres.git synced 2025-06-30 23:23:40 +02:00

Rename function for isolated database connection

Other ways to clean the database in tests will be added soon, so the
tests are being moved to a separate file.
This commit is contained in:
Vasiliy Vasilyuk
2024-06-30 22:53:05 +03:00
parent 83b2f61e41
commit 13e3596692
5 changed files with 108 additions and 99 deletions

View File

@ -76,8 +76,7 @@ total: (statements) 100.0%
- Example of test database connection management
in [testingpg](https://github.com/xorcare/testing-go-code-with-postgres/tree/main/testingpg)
package.
- Example of
integration [tests](https://github.com/xorcare/testing-go-code-with-postgres/blob/main/user_repository_test.go).
- [Example of integration testing with isolated database for each testcase](https://github.com/xorcare/testing-go-code-with-postgres/blob/main/user_repository_with_isolated_database_test.go).
- And example
of [GitHub Actions](https://github.com/xorcare/testing-go-code-with-postgres/blob/main/.github/workflows/go.yml)
and [Gitlab CI](https://github.com/xorcare/testing-go-code-with-postgres/blob/main/.gitlab-ci.yml).