github.com/authzed/spicedb@v1.32.1-0.20240520085336-ebda56537386/internal/datastore/proxy/observable_test.go (about) 1 package proxy 2 3 import ( 4 "testing" 5 "time" 6 7 "github.com/authzed/spicedb/internal/datastore/memdb" 8 "github.com/authzed/spicedb/pkg/datastore" 9 "github.com/authzed/spicedb/pkg/datastore/test" 10 ) 11 12 type observableTest struct{} 13 14 func (obs observableTest) New(revisionQuantization, _, gcWindow time.Duration, watchBufferLength uint16) (datastore.Datastore, error) { 15 db, err := memdb.NewMemdbDatastore(watchBufferLength, revisionQuantization, gcWindow) 16 if err != nil { 17 return nil, err 18 } 19 return NewObservableDatastoreProxy(db), nil 20 } 21 22 func TestObservableProxy(t *testing.T) { 23 test.All(t, observableTest{}) 24 } 25 26 func (p *observableProxy) ExampleRetryableError() error { 27 return memdb.ErrSerialization 28 }