Test coverage - missing 1%

This commit is contained in:
martinsumner 2017-02-26 20:52:40 +00:00
parent fb54d29873
commit 41e5686a66
2 changed files with 9 additions and 0 deletions

View file

@ -1110,6 +1110,13 @@ add_missing_hash({K, {SQN, ST, MD}}) ->
{K, {SQN, ST, leveled_codec:magic_hash(K), MD}}.
clean_dir_test() ->
% Pointless gesture to test coverage
RootPath = "../test/ledger",
?assertMatch(ok, file:write_file(RootPath ++ "/test.bob", "hello")),
?assertMatch(ok, clean_subdir(RootPath ++ "/test.bob")),
?assertMatch(ok, file:delete(RootPath ++ "/test.bob")).
simple_server_test() ->
RootPath = "../test/ledger",
clean_testdir(RootPath),

View file

@ -102,6 +102,7 @@ many_put_fetch_head(_Config) ->
{ok, Bookie3} = leveled_bookie:book_start(StartOpts2),
testutil:check_forlist(Bookie3, ChkList2A),
testutil:check_forobject(Bookie3, TestObject),
testutil:check_formissingobject(Bookie3, "Bookie1", "MissingKey0123"),
ok = leveled_bookie:book_destroy(Bookie3).
journal_compaction(_Config) ->
@ -455,6 +456,7 @@ load_and_count_withdelete(_Config) ->
ok = leveled_bookie:book_close(Bookie1),
{ok, Bookie2} = leveled_bookie:book_start(StartOpts1),
testutil:check_formissingobject(Bookie2, BucketD, KeyD),
testutil:check_formissingobject(Bookie2, "Bookie1", "MissingKey0123"),
{_BSize, 0} = testutil:check_bucket_stats(Bookie2, BucketD),
ok = leveled_bookie:book_close(Bookie2),
testutil:reset_filestructure().