refactor s3 provider
This commit is contained in:
@@ -25,7 +25,6 @@
|
||||
|
||||
#include "app_config.hpp"
|
||||
#include "comm/curl/curl_comm.hpp"
|
||||
#include "comm/s3/s3_comm.hpp"
|
||||
#include "drives/fuse/fuse_drive.hpp"
|
||||
#include "platform/platform.hpp"
|
||||
#include "providers/s3/s3_provider.hpp"
|
||||
@@ -54,10 +53,8 @@ static void execute_unmount(i_provider &provider,
|
||||
EXPECT_STREQ("/", fsi.api_path.c_str());
|
||||
EXPECT_TRUE(fsi.api_parent.empty());
|
||||
EXPECT_TRUE(fsi.directory);
|
||||
EXPECT_TRUE(fsi.encryption_token.empty());
|
||||
EXPECT_EQ(std::uint64_t(0u), fsi.size);
|
||||
EXPECT_TRUE(fsi.source_path.empty());
|
||||
EXPECT_FALSE(fsi.is_encrypted());
|
||||
|
||||
api_meta_map meta{};
|
||||
EXPECT_EQ(api_error::success, provider.get_item_meta("/", meta));
|
||||
@@ -511,9 +508,6 @@ TEST(fuse_drive, all_tests) {
|
||||
EXPECT_TRUE(utils::file::create_full_directory_path(mount_location));
|
||||
{
|
||||
std::unique_ptr<app_config> config_ptr{};
|
||||
#ifdef REPERTORY_ENABLE_S3
|
||||
std::unique_ptr<s3_comm> s3_comm_ptr{};
|
||||
#endif
|
||||
std::unique_ptr<curl_comm> comm_ptr{};
|
||||
std::unique_ptr<i_provider> provider_ptr{};
|
||||
std::unique_ptr<lock_data> lock_data_ptr{};
|
||||
@@ -537,8 +531,8 @@ TEST(fuse_drive, all_tests) {
|
||||
config_ptr->set_s3_config(src_cfg.get_s3_config());
|
||||
}
|
||||
|
||||
s3_comm_ptr = std::make_unique<s3_comm>(*config_ptr);
|
||||
provider_ptr = std::make_unique<s3_provider>(*config_ptr, *s3_comm_ptr);
|
||||
comm_ptr = std::make_unique<curl_comm>(config_ptr->get_s3_config());
|
||||
provider_ptr = std::make_unique<s3_provider>(*config_ptr, *comm_ptr);
|
||||
lock_data_ptr = std::make_unique<lock_data>(
|
||||
provider_type::s3, "unittests_" + std::to_string(idx));
|
||||
#else
|
||||
|
Reference in New Issue
Block a user