pgxtester

command module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 8, 2024 License: MIT Imports: 7 Imported by: 0

README

pgxtester

A Go package for testing code that uses PostgreSQL. It establishes a concurrency-safe pgx connection, wraps it into a transaction, and rolls back the transaction at the end of the test. This ensures that changes done in a test will not affect other tests.

Installation

go get github.com/orsinium-labs/pgxtester

Usage

func SomeTest(t *testing.T) {
    conn := pgxtester.Connect(t, pgxtester.Config{URL: "..."})
    // ...
}

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL