unit tests and fixes
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit

This commit is contained in:
2025-01-25 06:20:50 -06:00
parent feeef3a044
commit 26358b1e67
2 changed files with 6 additions and 8 deletions

View File

@ -171,10 +171,6 @@ void rdb_file_db::enumerate_item_list(
callback(list);
list.clear();
}
if (not list.empty()) {
callback(list);
}
}
{
@ -194,10 +190,10 @@ void rdb_file_db::enumerate_item_list(
callback(list);
list.clear();
}
}
if (not list.empty()) {
callback(list);
}
if (not list.empty()) {
callback(list);
}
}

View File

@ -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,