test fixes
This commit is contained in:
@@ -27,24 +27,19 @@
|
||||
#include "app_config.hpp"
|
||||
#include "platform/platform.hpp"
|
||||
#include "types/repertory.hpp"
|
||||
#include "utils/file_utils.hpp"
|
||||
#include "utils/file.hpp"
|
||||
#include "utils/path.hpp"
|
||||
#include "utils/utils.hpp"
|
||||
|
||||
#include "providers/s3/s3_provider.hpp"
|
||||
#include "providers/sia/sia_provider.hpp"
|
||||
#if defined(_WIN32)
|
||||
#include "drives/winfsp/remotewinfsp/remote_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)
|
||||
#include "comm/curl/curl_comm.hpp"
|
||||
#include "db/i_meta_db.hpp"
|
||||
#include "db/meta_db.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)
|
||||
// 0777
|
||||
@@ -136,7 +131,8 @@ struct platform_ops {
|
||||
#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 (is_mount) {
|
||||
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,
|
||||
const std::string &location) {
|
||||
[[maybe_unused]] const std::string &location) {
|
||||
ensure_process_cwd();
|
||||
args_without_unmount.emplace_back("-unmount");
|
||||
|
||||
@@ -221,7 +217,7 @@ protected:
|
||||
const auto make_cfg_dir = [](const std::string &root,
|
||||
const std::string &name) -> std::string {
|
||||
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;
|
||||
};
|
||||
|
||||
@@ -237,10 +233,10 @@ protected:
|
||||
cfg_obj.set_event_level(event_level::trace);
|
||||
cfg_obj.set_s3_config(cfg);
|
||||
|
||||
auto r = cfg_obj.get_remote_mount();
|
||||
r.enable = true;
|
||||
r.api_port = provider_t::remote_port;
|
||||
cfg_obj.set_remote_mount(r);
|
||||
auto remote_cfg = cfg_obj.get_remote_mount();
|
||||
remote_cfg.enable = true;
|
||||
remote_cfg.api_port = provider_t::remote_port;
|
||||
cfg_obj.set_remote_mount(remote_cfg);
|
||||
};
|
||||
|
||||
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_sia_config(src_cfg.get_sia_config());
|
||||
|
||||
auto r = cfg_obj.get_remote_mount();
|
||||
r.enable = true;
|
||||
r.api_port = provider_t::remote_port;
|
||||
cfg_obj.set_remote_mount(r);
|
||||
auto remote_cfg = cfg_obj.get_remote_mount();
|
||||
remote_cfg.enable = true;
|
||||
remote_cfg.api_port = provider_t::remote_port;
|
||||
cfg_obj.set_remote_mount(remote_cfg);
|
||||
};
|
||||
|
||||
const auto mount_local_s3 = [&](bool as_remote) {
|
||||
|
@@ -24,7 +24,7 @@
|
||||
#include "fixtures/drive_fixture.hpp"
|
||||
|
||||
namespace {
|
||||
const auto access_permutations = {
|
||||
constexpr const auto access_permutations = {
|
||||
// clang-format off
|
||||
std::make_tuple(0000, R_OK, -1, EACCES), // No permissions, R_OK
|
||||
std::make_tuple(0000, W_OK, -1, EACCES), // No permissions, W_OK
|
||||
|
Reference in New Issue
Block a user