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

Function reset

internal/relationtuple/manager_isolation.go:27–42  ·  view source on GitHub ↗
(t *testing.T, ms ...Manager)

Source from the content-addressed store, hash-verified

25}
26
27func reset(t *testing.T, ms ...Manager) {
28 ctx := context.Background()
29
30 for _, m := range ms {
31 for {
32 rts, next, err := m.GetRelationTuples(ctx, &RelationQuery{})
33 require.NoError(t, err)
34
35 require.NoError(t, m.DeleteRelationTuples(ctx, rts...))
36
37 if next.IsLast() {
38 break
39 }
40 }
41 }
42}
43
44func IsolationTest(t *testing.T, m0, m1 Manager) {
45 ctx := context.Background()

Callers 1

IsolationTestFunction · 0.85

Calls 3

GetRelationTuplesMethod · 0.65
DeleteRelationTuplesMethod · 0.65
IsLastMethod · 0.45

Tested by

no test coverage detected