MCPcopy
hub / github.com/ory/keto / newTestEngine

Function newTestEngine

internal/expand/engine_test.go:32–38  ·  view source on GitHub ↗
(t *testing.T, namespaces []*namespace.Namespace, paginationOpts ...keysetpagination.Option)

Source from the content-addressed store, hash-verified

30func (d *deps) RelationTupleManager() relationtuple.Manager { return d.mw }
31
32func newTestEngine(t *testing.T, namespaces []*namespace.Namespace, paginationOpts ...keysetpagination.Option) (*relationtuple.ManagerWrapper, *expand.Engine) {
33 innerReg := driver.NewSqliteTestRegistry(t, false)
34 require.NoError(t, innerReg.Config(context.Background()).Set(config.KeyNamespaces, namespaces))
35 reg := relationtuple.NewManagerWrapper(t, innerReg, paginationOpts...)
36 e := expand.NewEngine(&deps{mw: reg, RegistryDefault: innerReg})
37 return reg, e
38}
39
40func TestEngine(t *testing.T) {
41 t.Run("case=returns SubjectID on expand", func(t *testing.T) {

Callers 1

TestEngineFunction · 0.85

Calls 5

NewSqliteTestRegistryFunction · 0.92
NewManagerWrapperFunction · 0.92
NewEngineFunction · 0.92
ConfigMethod · 0.65
SetMethod · 0.45

Tested by

no test coverage detected