mirror of
https://github.com/logos-storage/nim-datastore.git
synced 2026-01-07 08:03:13 +00:00
test setup
This commit is contained in:
parent
03830cef8f
commit
a68ce94c8d
@ -106,7 +106,7 @@ method close*(
|
||||
|
||||
proc newSharedDataStore*(
|
||||
ds: Datastore,
|
||||
): Future[?!SharedDatastore] {.async.} =
|
||||
): ?!SharedDatastore =
|
||||
|
||||
var self = SharedDatastore()
|
||||
|
||||
|
||||
@ -23,7 +23,7 @@ suite "Test Basic SharedDatastore":
|
||||
var sds: SharedDatastore
|
||||
|
||||
let mem = MemoryDatastore.new()
|
||||
let res = await newSharedDataStore(mem)
|
||||
let res = newSharedDataStore(mem)
|
||||
check res.isOk()
|
||||
sds = res.get()
|
||||
# echo "sds: ", repr sds
|
||||
@ -51,12 +51,14 @@ suite "Test Basic FSDatastore":
|
||||
|
||||
var
|
||||
memStore: MemoryDatastore
|
||||
ds: SharedDatastore
|
||||
key = Key.init("/a/b").tryGet()
|
||||
bytes = "some bytes".toBytes
|
||||
otherBytes = "some other bytes".toBytes
|
||||
|
||||
setupAll:
|
||||
memStore = MemoryDatastore.new()
|
||||
ds = newSharedDataStore(memStore).expect("should work")
|
||||
|
||||
teardownAll:
|
||||
(await memStore.close()).get()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user