Skip to content

Releases: olomix/go-test-pg

v2.1.0

10 Feb 09:17

Choose a tag to compare

What's Changed

New Features

  • Functional options for connection configuration — New WithPoolConfig option lets you customize *pgxpool.Config per-test or globally via Pgpool.Options. Per-test options override global ones.

Bug Fixes

  • Fix missing error in t.Fatal() callcreateRndDBPool now passes the error to t.Fatal(err) instead of calling t.Fatal() with no message.
  • Fix ConnConfig leak in std cleanupstdlib.UnregisterConnConfig is now called via defer so it runs even when cleanup returns early due to unreleased connections or a db.Close() failure.
  • Unregister ConnConfig on sql.Open failure — Added missing stdlib.UnregisterConnConfig call on the error path when sql.Open fails.

Dependencies

  • Upgrade pgx to v5.8.0 — Drops the transitive golang.org/x/crypto dependency that carried a CVE.
  • Minimum Go version bumped to 1.24

CI / Maintenance

  • Updated GitHub Actions (checkout, setup-go, golangci-lint-action) to latest versions.
  • Test matrix now covers Go 1.24 and 1.25 on ubuntu-latest instead of container-based builds.
  • README rewritten for clarity.

v2.0.1

24 Mar 08:20

Choose a tag to compare

Fix database locking on recent versions of pgx.

v2.0.0

24 Mar 07:19
e6087da

Choose a tag to compare

Upgrade to pgx/v5

v1.0.2

14 Mar 10:24

Choose a tag to compare

Fix conflict on parallel creation of template database from different processes by taking advisory lock on PostgreSQL.

v1.0.1

13 Nov 04:19

Choose a tag to compare

fix module version

v1.0.0

13 Nov 04:15

Choose a tag to compare

In new major version there are two significant changes.

  • Cleanup function calls automatically on test exit. You do not need to call it in defer.
  • New methods for compatibility with database/sql interfaces return standard *sql.DB in addition to pgx.

v0.0.4

27 Apr 07:27

Choose a tag to compare

fix default base template database name

v0.0.3

25 Apr 12:19

Choose a tag to compare

Remove builder of pool. Use struct directly. This simplifies setup for new projects.

v0.0.2

25 Apr 09:55
258aa0b

Choose a tag to compare

Create license file to be visible by pkg.go.dev

First release

25 Apr 08:45

Choose a tag to compare

v0.0.1

Add WithFixtures & WithSQLs methods to load fixtures. Add posibility …