2023-11-01 03:32:09 +00:00
|
|
|
# Nimbus
|
|
|
|
# Copyright (c) 2023 Status Research & Development GmbH
|
|
|
|
# Licensed under either of
|
|
|
|
# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0)
|
|
|
|
# * MIT license ([LICENSE-MIT](LICENSE-MIT) or
|
|
|
|
# http://opensource.org/licenses/MIT)
|
|
|
|
# at your option. This file may not be copied, modified, or distributed except
|
|
|
|
# according to those terms.
|
|
|
|
|
|
|
|
|
2022-04-06 05:28:19 +00:00
|
|
|
{.used.}
|
|
|
|
|
|
|
|
import
|
|
|
|
std/os,
|
|
|
|
unittest2,
|
|
|
|
eth/db/kvstore,
|
|
|
|
../../nimbus/db/kvstore_rocksdb,
|
|
|
|
eth/../tests/db/test_kvstore
|
|
|
|
|
|
|
|
suite "RocksStoreRef":
|
|
|
|
test "KvStore interface":
|
|
|
|
let tmp = getTempDir() / "nimbus-test-db"
|
|
|
|
removeDir(tmp)
|
|
|
|
|
|
|
|
let db = RocksStoreRef.init(tmp, "test")[]
|
|
|
|
defer:
|
|
|
|
db.close()
|
|
|
|
|
2023-01-27 14:57:48 +00:00
|
|
|
testKvStore(kvStore db, false, false)
|