Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(t TestingT, opts ...Option) *entv1.Client

NewClient calls entv1.NewClient and auto-run migration.

func Open

func Open(t TestingT, driverName, dataSourceName string, opts ...Option) *entv1.Client

Open calls entv1.Open and auto-run migration.

Types

type Option

type Option func(*options)

Option configures client creation.

func WithMigrateOptions

func WithMigrateOptions(opts ...schema.MigrateOption) Option

WithMigrateOptions forwards options to auto migration.

func WithOptions

func WithOptions(opts ...entv1.Option) Option

WithOptions forwards options to client creation.

type TestingT

type TestingT interface {
	FailNow()
	Error(...interface{})
}

TestingT is the interface that is shared between testing.T and testing.B and used by enttest.

Source Files