test: improve dbfs tests
- Remove a placeholder panic in `dbfs_test.v`. - Improve `namedb_test.v` by using `get_from_id` to retrieve public keys by ID and then using `get` to retrieve the data associated with the public key. This better reflects the intended usage and clarifies the test. Co-authored-by: supermario <mariobassem12@gmail.com>
This commit is contained in:
@@ -35,8 +35,6 @@ fn test_dbfs3() {
|
||||
withkeys: true
|
||||
keyshashed: true
|
||||
)!
|
||||
|
||||
panic('need other test')
|
||||
}
|
||||
|
||||
fn dotest(mut db DB, mut dbcollection DBCollection) ! {
|
||||
|
||||
@@ -44,8 +44,8 @@ fn test_dbname1() {
|
||||
// Retrieve public keys using their unique IDs
|
||||
console.print_debug('retrieve starts')
|
||||
for i2, myid in ids {
|
||||
retrieved_pubkey, data := ndb.get(myid)!
|
||||
myid_found, data_found := ndb.getdata(retrieved_pubkey)!
|
||||
retrieved_pubkey, data := ndb.get_from_id(myid)!
|
||||
myid_found, data_found := ndb.get(retrieved_pubkey)!
|
||||
assert myid_found == myid
|
||||
assert data_found == data
|
||||
tc := test_cases[i2] or {
|
||||
|
||||
Reference in New Issue
Block a user