unit tests and fixes
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
This commit is contained in:
@ -171,10 +171,6 @@ void rdb_file_db::enumerate_item_list(
|
||||
callback(list);
|
||||
list.clear();
|
||||
}
|
||||
|
||||
if (not list.empty()) {
|
||||
callback(list);
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
@ -194,11 +190,11 @@ void rdb_file_db::enumerate_item_list(
|
||||
callback(list);
|
||||
list.clear();
|
||||
}
|
||||
}
|
||||
|
||||
if (not list.empty()) {
|
||||
callback(list);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
auto rdb_file_db::get_api_path(const std::string &source_path,
|
||||
|
@ -21,6 +21,7 @@
|
||||
*/
|
||||
|
||||
#include "fixtures/file_db_fixture.hpp"
|
||||
#include <filesystem>
|
||||
|
||||
namespace {
|
||||
const auto get_stop_requested = []() -> bool { return false; };
|
||||
@ -343,7 +344,8 @@ TYPED_TEST(file_db_test, item_not_found_is_returned_for_non_existing_api_path) {
|
||||
TYPED_TEST(file_db_test, can_enumerate_item_list) {
|
||||
this->file_db->clear();
|
||||
|
||||
EXPECT_EQ(api_error::success, this->file_db->add_directory("/", "c:\\test"));
|
||||
EXPECT_EQ(api_error::success,
|
||||
this->file_db->add_directory("/", std::filesystem::current_path()));
|
||||
EXPECT_EQ(api_error::success, this->file_db->add_or_update_file({
|
||||
"/file",
|
||||
0U,
|
||||
|
Reference in New Issue
Block a user