9
9
"github.com/stretchr/testify/require"
10
10
11
11
"github.com/authzed/spicedb/internal/datastore/common"
12
+ "github.com/authzed/spicedb/internal/datastore/dsfortesting"
12
13
"github.com/authzed/spicedb/internal/datastore/memdb"
13
14
"github.com/authzed/spicedb/internal/dispatch"
14
15
"github.com/authzed/spicedb/internal/dispatch/caching"
@@ -153,7 +154,7 @@ func TestMaxDepth(t *testing.T) {
153
154
t .Parallel ()
154
155
require := require .New (t )
155
156
156
- rawDS , err := memdb . NewMemdbDatastore (0 , 0 , memdb .DisableGC )
157
+ rawDS , err := dsfortesting . NewMemDBDatastoreForTesting (0 , 0 , memdb .DisableGC )
157
158
require .NoError (err )
158
159
159
160
ds , _ := testfixtures .StandardDatastoreWithSchema (rawDS , require )
@@ -1322,7 +1323,7 @@ func TestCheckPermissionOverSchema(t *testing.T) {
1322
1323
1323
1324
dispatcher := NewLocalOnlyDispatcher (10 , 100 )
1324
1325
1325
- ds , err := memdb . NewMemdbDatastore (0 , 0 , memdb .DisableGC )
1326
+ ds , err := dsfortesting . NewMemDBDatastoreForTesting (0 , 0 , memdb .DisableGC )
1326
1327
require .NoError (err )
1327
1328
1328
1329
ds , revision := testfixtures .DatastoreFromSchemaAndTestRelationships (ds , tc .schema , tc .relationships , require )
@@ -1823,7 +1824,7 @@ func TestCheckWithHints(t *testing.T) {
1823
1824
1824
1825
dispatcher := NewLocalOnlyDispatcher (10 , 100 )
1825
1826
1826
- ds , err := memdb . NewMemdbDatastore (0 , 0 , memdb .DisableGC )
1827
+ ds , err := dsfortesting . NewMemDBDatastoreForTesting (0 , 0 , memdb .DisableGC )
1827
1828
require .NoError (err )
1828
1829
1829
1830
ds , revision := testfixtures .DatastoreFromSchemaAndTestRelationships (ds , tc .schema , tc .relationships , require )
@@ -1863,7 +1864,7 @@ func TestCheckHintsPartialApplication(t *testing.T) {
1863
1864
1864
1865
dispatcher := NewLocalOnlyDispatcher (10 , 100 )
1865
1866
1866
- ds , err := memdb . NewMemdbDatastore (0 , 0 , memdb .DisableGC )
1867
+ ds , err := dsfortesting . NewMemDBDatastoreForTesting (0 , 0 , memdb .DisableGC )
1867
1868
require .NoError (err )
1868
1869
1869
1870
ds , revision := testfixtures .DatastoreFromSchemaAndTestRelationships (ds , `
@@ -1909,7 +1910,7 @@ func TestCheckHintsPartialApplicationOverArrow(t *testing.T) {
1909
1910
1910
1911
dispatcher := NewLocalOnlyDispatcher (10 , 100 )
1911
1912
1912
- ds , err := memdb . NewMemdbDatastore (0 , 0 , memdb .DisableGC )
1913
+ ds , err := dsfortesting . NewMemDBDatastoreForTesting (0 , 0 , memdb .DisableGC )
1913
1914
require .NoError (err )
1914
1915
1915
1916
ds , revision := testfixtures .DatastoreFromSchemaAndTestRelationships (ds , `
@@ -1955,7 +1956,7 @@ func TestCheckHintsPartialApplicationOverArrow(t *testing.T) {
1955
1956
}
1956
1957
1957
1958
func newLocalDispatcherWithConcurrencyLimit (t testing.TB , concurrencyLimit uint16 ) (context.Context , dispatch.Dispatcher , datastore.Revision ) {
1958
- rawDS , err := memdb . NewMemdbDatastore (0 , 0 , memdb .DisableGC )
1959
+ rawDS , err := dsfortesting . NewMemDBDatastoreForTesting (0 , 0 , memdb .DisableGC )
1959
1960
require .NoError (t , err )
1960
1961
1961
1962
ds , revision := testfixtures .StandardDatastoreWithData (rawDS , require .New (t ))
@@ -1977,7 +1978,7 @@ func newLocalDispatcher(t testing.TB) (context.Context, dispatch.Dispatcher, dat
1977
1978
}
1978
1979
1979
1980
func newLocalDispatcherWithSchemaAndRels (t testing.TB , schema string , rels []tuple.Relationship ) (context.Context , dispatch.Dispatcher , datastore.Revision ) {
1980
- rawDS , err := memdb . NewMemdbDatastore (0 , 0 , memdb .DisableGC )
1981
+ rawDS , err := dsfortesting . NewMemDBDatastoreForTesting (0 , 0 , memdb .DisableGC )
1981
1982
require .NoError (t , err )
1982
1983
1983
1984
ds , revision := testfixtures .DatastoreFromSchemaAndTestRelationships (rawDS , schema , rels , require .New (t ))
0 commit comments