mirror of
https://github.com/logos-storage/nim-datastore.git
synced 2026-01-05 23:23:10 +00:00
add sqlite query tests
This commit is contained in:
parent
812b4fd3b6
commit
6d5c4716f2
@ -39,6 +39,27 @@ suite "Test Basic ThreadDatastore with SQLite":
|
||||
taskPool.shutdown()
|
||||
|
||||
basicStoreTests(ds, key, bytes, otherBytes)
|
||||
|
||||
|
||||
suite "Test Query ThreadDatastore with SQLite":
|
||||
|
||||
var
|
||||
sqlStore: Datastore
|
||||
ds: ThreadDatastore
|
||||
taskPool: Taskpool
|
||||
key = Key.init("/a/b").tryGet()
|
||||
bytes = "some bytes".toBytes
|
||||
otherBytes = "some other bytes".toBytes
|
||||
|
||||
setup:
|
||||
sqlStore = SQLiteDatastore.new(Memory).tryGet()
|
||||
taskPool = Taskpool.new(countProcessors() * 2)
|
||||
ds = ThreadDatastore.new(sqlStore, taskPool).tryGet()
|
||||
|
||||
teardown:
|
||||
(await ds.close()).tryGet()
|
||||
taskPool.shutdown()
|
||||
|
||||
queryTests(ds, true)
|
||||
|
||||
# suite "Test Basic ThreadDatastore with fsds":
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user