MCPcopy Create free account
hub / github.com/chainloop-dev/chainloop / Open

Function Open

app/controlplane/pkg/data/ent/enttest/enttest.go:56–65  ·  view source on GitHub ↗

Open calls ent.Open and auto-run migration.

(t TestingT, driverName, dataSourceName string, opts ...Option)

Source from the content-addressed store, hash-verified

54
55// Open calls ent.Open and auto-run migration.
56func Open(t TestingT, driverName, dataSourceName string, opts ...Option) *ent.Client {
57 o := newOptions(opts)
58 c, err := ent.Open(driverName, dataSourceName, o.opts...)
59 if err != nil {
60 t.Error(err)
61 t.FailNow()
62 }
63 migrateSchema(t, c, o)
64 return c
65}
66
67// NewClient calls ent.NewClient and auto-run migration.
68func NewClient(t TestingT, opts ...Option) *ent.Client {

Callers

nothing calls this directly

Calls 5

OpenFunction · 0.92
newOptionsFunction · 0.85
migrateSchemaFunction · 0.85
FailNowMethod · 0.80
ErrorMethod · 0.65

Tested by

no test coverage detected