enttest

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

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

NewClient calls ent.NewClient and auto-run migration.

func Open

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

Open calls ent.Open and auto-run migration.

Types

type Option

type Option func(*options)

Option configures client creation.

func WithOptions

func WithOptions(opts ...ent.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.

Jump to

Keyboard shortcuts

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