From 0f0e113f4faae58ea14720cd08f5e1adccc6fbb6 Mon Sep 17 00:00:00 2001 From: Jaremy Creechley Date: Wed, 27 Sep 2023 19:49:59 -0700 Subject: [PATCH] refactor - tests --- datastore/fsds.nim | 5 +++-- tests/datastore/backendCommonTests.nim | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/datastore/fsds.nim b/datastore/fsds.nim index 24874a0..9d15372 100644 --- a/datastore/fsds.nim +++ b/datastore/fsds.nim @@ -190,6 +190,7 @@ proc query*[K,V]( let key = query.key without path =? self.findPath(key), error: return failure error + echo "query:key: ", key let basePath = # it there is a file in the directory @@ -211,10 +212,10 @@ proc close*[K,V](handle: var DbQueryHandle[K,V,FsQueryEnv[K,V]]) = iterator iter*[K, V](handle: var DbQueryHandle[K, V, FsQueryEnv[K,V]] ): ?!DbQueryResponse[K, V] = let root = $(handle.env.self.root) - # echo "FS:root: ", root + echo "FS:root: ", root for path in root.dirIter(): - # echo "FS:path: ", path + echo "FS:path: ", path if handle.cancel: # echo "FS:CANCELLED!" break diff --git a/tests/datastore/backendCommonTests.nim b/tests/datastore/backendCommonTests.nim index 9af3de7..3e99cee 100644 --- a/tests/datastore/backendCommonTests.nim +++ b/tests/datastore/backendCommonTests.nim @@ -161,9 +161,11 @@ template queryTests*( handle = ds.query(q).tryGet let res = handle.iter().toSeq().mapIt(block: - echo "RES: ", it.repr + echo "\nRES: ", it.repr + # quit(1) it.tryGet() - ) + ) + # ).filterIt(it.isOk).mapIt(it.tryGet()) check: res.len == 2