test setup

This commit is contained in:
Jaremy Creechley 2023-08-28 21:59:31 -07:00 committed by Dmitriy Ryajov
parent 03830cef8f
commit a68ce94c8d
No known key found for this signature in database
GPG Key ID: DA8C680CE7C657A4
2 changed files with 4 additions and 2 deletions

View File

@ -106,7 +106,7 @@ method close*(
proc newSharedDataStore*(
ds: Datastore,
): Future[?!SharedDatastore] {.async.} =
): ?!SharedDatastore =
var self = SharedDatastore()

View File

@ -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()