Updated test for new API
This commit is contained in:
parent
38bd48dff3
commit
86e733e45e
1 changed files with 22 additions and 1 deletions
|
@ -9,7 +9,8 @@
|
|||
-compile(export_all).
|
||||
|
||||
all() ->
|
||||
[test_db].
|
||||
% [test_db].
|
||||
[test_put].
|
||||
|
||||
init_per_testcase(TestCase, Config) ->
|
||||
Config.
|
||||
|
@ -46,3 +47,23 @@ test_db(_Config) ->
|
|||
true = port_close(P2).
|
||||
|
||||
|
||||
test_put(_Config) ->
|
||||
{ok, P} = bdberl_port:new(),
|
||||
{ok, 0} = bdberl_port:open_database(P, "test1", hash),
|
||||
|
||||
ok = bdberl_port:txn_begin(P),
|
||||
|
||||
ok = bdberl_port:put(P, 0, akey, avalue),
|
||||
|
||||
ok = bdberl_port:txn_commit(P),
|
||||
|
||||
ok = bdberl_port:txn_begin(P),
|
||||
|
||||
{ok, avalue} = bdberl_port:get(P, 0, akey),
|
||||
|
||||
ok = bdberl_port:txn_commit(P).
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue