diff options
| author | Stefan Majewsky <majewsky@gmx.net> | 2026-08-01 14:49:15 +0200 |
|---|---|---|
| committer | Stefan Majewsky <majewsky@gmx.net> | 2026-08-01 14:49:49 +0200 |
| commit | 6d72c85766a8355e1d660ff0c19b43e93faad4d8 (patch) | |
| tree | 118c3cbdf43a9d4355ece98ea70bd184630b4e1c /testing/pgruntime/main_test.go | |
| parent | e26a214de3958e48e94cdac0e1ae0641e3221deb (diff) | |
| download | go-gg-6d72c85766a8355e1d660ff0c19b43e93faad4d8.tar.gz | |
add testing/pgruntime
Testing pgruntime has quickly turned out to be a nightmare, because so
many parts of the test logic are not easily reproducible (e.g.
`stopDBIfLingering`). I decided to not waste a bunch of time testing
code that is relatively compact and easy to verify by careful
examination, and that is unlikely to change a lot in the future.
Diffstat (limited to 'testing/pgruntime/main_test.go')
| -rw-r--r-- | testing/pgruntime/main_test.go | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/testing/pgruntime/main_test.go b/testing/pgruntime/main_test.go new file mode 100644 index 0000000..3f23871 --- /dev/null +++ b/testing/pgruntime/main_test.go @@ -0,0 +1,20 @@ +// SPDX-FileCopyrightText: 2026 Stefan Majewsky <majewsky@gmx.net> +// SPDX-License-Identifier: Apache-2.0 + +package pgruntime_test + +import ( + "testing" + + _ "github.com/lib/pq" + "go.xyrillian.de/gg/pgruntime" +) + +var ( + defaultBehavior = pgruntime.ConnectionBehavior{} + connector = pgruntime.StdConnector("postgres") +) + +func TestMain(m *testing.M) { + pgruntime.WithTestDB(m, m.Run) +} |
