package enttest
import "git.dotya.ml/mirre-mt/pcmt/ent/enttest"
Index ¶
- func NewClient(t TestingT, opts ...Option) *ent.Client
- func Open(t TestingT, driverName, dataSourceName string, opts ...Option) *ent.Client
- type Option
- func WithMigrateOptions(opts ...schema.MigrateOption) Option
- func WithOptions(opts ...ent.Option) Option
- type TestingT
Functions ¶
func NewClient ¶
NewClient calls ent.NewClient and auto-run migration.
func Open ¶
Open calls ent.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 ¶
WithOptions forwards options to client creation.
type TestingT ¶
type TestingT interface { FailNow() Error(...any) }
TestingT is the interface that is shared between testing.T and testing.B and used by enttest.
Source Files ¶
enttest.go
- Version
- v0.0.0-20230910121657-4d10510f5ba4 (latest)
- Published
- Sep 10, 2023
- Platform
- linux/amd64
- Imports
- 5 packages
- Last checked
- 1 month ago –
Tools for package owners.