test fixes
All checks were successful
Blockstorage/repertory/pipeline/head This commit looks good
BlockStorage/repertory/pipeline/head This commit looks good

This commit is contained in:
2025-09-19 09:00:26 -05:00
parent c4ce61ba20
commit 7116ea84fd
2 changed files with 16 additions and 20 deletions

View File

@@ -27,24 +27,19 @@
#include "app_config.hpp" #include "app_config.hpp"
#include "platform/platform.hpp" #include "platform/platform.hpp"
#include "types/repertory.hpp" #include "types/repertory.hpp"
#include "utils/file_utils.hpp" #include "utils/file.hpp"
#include "utils/path.hpp" #include "utils/path.hpp"
#include "utils/utils.hpp" #include "utils/utils.hpp"
#include "providers/s3/s3_provider.hpp"
#include "providers/sia/sia_provider.hpp"
#if defined(_WIN32) #if defined(_WIN32)
#include "drives/winfsp/remotewinfsp/remote_winfsp_drive.hpp" #include "drives/winfsp/remotewinfsp/remote_winfsp_drive.hpp"
#include "drives/winfsp/winfsp_drive.hpp" #include "drives/winfsp/winfsp_drive.hpp"
#include "providers/i_provider.hpp"
#include "providers/s3/s3_provider.hpp"
#include "providers/sia/sia_provider.hpp"
#else // !defined(_WIN32) #else // !defined(_WIN32)
#include "comm/curl/curl_comm.hpp"
#include "db/i_meta_db.hpp" #include "db/i_meta_db.hpp"
#include "db/meta_db.hpp" #include "db/meta_db.hpp"
#include "drives/fuse/fuse_drive.hpp" #include "drives/fuse/fuse_drive.hpp"
#include "providers/encrypt/encrypt_provider.hpp"
#include "providers/s3/s3_provider.hpp"
#include "providers/sia/sia_provider.hpp"
#if !defined(ACCESSPERMS) #if !defined(ACCESSPERMS)
// 0777 // 0777
@@ -136,7 +131,8 @@ struct platform_ops {
#endif // !defined(_WIN32) #endif // !defined(_WIN32)
} }
static std::string build_cmd(const std::string &args_joined, bool is_mount) { static auto build_cmd(const std::string &args_joined,
[[maybe_unused]] bool is_mount) -> std::string {
#if defined(_WIN32) #if defined(_WIN32)
if (is_mount) { if (is_mount) {
return "start .\\repertory.exe -f " + args_joined; return "start .\\repertory.exe -f " + args_joined;
@@ -168,7 +164,7 @@ struct platform_ops {
} }
static void execute_unmount(std::vector<std::string> args_without_unmount, static void execute_unmount(std::vector<std::string> args_without_unmount,
const std::string &location) { [[maybe_unused]] const std::string &location) {
ensure_process_cwd(); ensure_process_cwd();
args_without_unmount.emplace_back("-unmount"); args_without_unmount.emplace_back("-unmount");
@@ -221,7 +217,7 @@ protected:
const auto make_cfg_dir = [](const std::string &root, const auto make_cfg_dir = [](const std::string &root,
const std::string &name) -> std::string { const std::string &name) -> std::string {
auto cfg = utils::path::combine(root, {name}); auto cfg = utils::path::combine(root, {name});
ASSERT_TRUE(utils::file::directory(cfg).create_directory()); EXPECT_TRUE(utils::file::directory(cfg).create_directory());
return cfg; return cfg;
}; };
@@ -237,10 +233,10 @@ protected:
cfg_obj.set_event_level(event_level::trace); cfg_obj.set_event_level(event_level::trace);
cfg_obj.set_s3_config(cfg); cfg_obj.set_s3_config(cfg);
auto r = cfg_obj.get_remote_mount(); auto remote_cfg = cfg_obj.get_remote_mount();
r.enable = true; remote_cfg.enable = true;
r.api_port = provider_t::remote_port; remote_cfg.api_port = provider_t::remote_port;
cfg_obj.set_remote_mount(r); cfg_obj.set_remote_mount(remote_cfg);
}; };
const auto configure_sia = [](app_config &cfg_obj) { const auto configure_sia = [](app_config &cfg_obj) {
@@ -253,10 +249,10 @@ protected:
cfg_obj.set_host_config(src_cfg.get_host_config()); cfg_obj.set_host_config(src_cfg.get_host_config());
cfg_obj.set_sia_config(src_cfg.get_sia_config()); cfg_obj.set_sia_config(src_cfg.get_sia_config());
auto r = cfg_obj.get_remote_mount(); auto remote_cfg = cfg_obj.get_remote_mount();
r.enable = true; remote_cfg.enable = true;
r.api_port = provider_t::remote_port; remote_cfg.api_port = provider_t::remote_port;
cfg_obj.set_remote_mount(r); cfg_obj.set_remote_mount(remote_cfg);
}; };
const auto mount_local_s3 = [&](bool as_remote) { const auto mount_local_s3 = [&](bool as_remote) {

View File

@@ -24,7 +24,7 @@
#include "fixtures/drive_fixture.hpp" #include "fixtures/drive_fixture.hpp"
namespace { namespace {
const auto access_permutations = { constexpr const auto access_permutations = {
// clang-format off // clang-format off
std::make_tuple(0000, R_OK, -1, EACCES), // No permissions, R_OK std::make_tuple(0000, R_OK, -1, EACCES), // No permissions, R_OK
std::make_tuple(0000, W_OK, -1, EACCES), // No permissions, W_OK std::make_tuple(0000, W_OK, -1, EACCES), // No permissions, W_OK