Help us shape the future of Go! Take the 2026 Go Developer Survey

conformance

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package conformance is the test suite every dialect has to pass: the same behaviour of the strategies and the guard, on whatever engine the dialect is for.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(t *testing.T, env Env)

Run runs the suite.

Types

type Env

type Env struct {
	// Driver is the database/sql driver name, to open a second connection with.
	Driver string
	// Options select the dialect (WithDialect) when the URL cannot.
	Options []dbcleaner.Option
	// Fresh returns the URL of an empty database that is dropped when the test ends.
	Fresh func(t *testing.T) string
	// Schema creates, one statement each: schema_migrations holding one row; authors
	// (id counting up by itself, name); books (id counting up by itself, author_id referencing
	// authors, title); tags (id counting up by itself, name, parent_id referencing tags).
	Schema []string
	// Leases is whether the dialect supports WithTemplate; if not, the suite checks it is refused.
	Leases bool
}

Env is one engine as the suite needs it.

Jump to

Keyboard shortcuts

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