|
|
@ -19,8 +19,6 @@
|
|
|
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
|
SOFTWARE.
|
|
|
|
SOFTWARE.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
#if 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "test_common.hpp"
|
|
|
|
#include "test_common.hpp"
|
|
|
|
|
|
|
|
|
|
|
|
#include "comm/curl/curl_comm.hpp"
|
|
|
|
#include "comm/curl/curl_comm.hpp"
|
|
|
@ -37,6 +35,7 @@
|
|
|
|
#include "utils/string.hpp"
|
|
|
|
#include "utils/string.hpp"
|
|
|
|
#include "utils/time.hpp"
|
|
|
|
#include "utils/time.hpp"
|
|
|
|
#include "utils/utils.hpp"
|
|
|
|
#include "utils/utils.hpp"
|
|
|
|
|
|
|
|
#include <spdlog/fmt/bundled/base.h>
|
|
|
|
|
|
|
|
|
|
|
|
namespace {
|
|
|
|
namespace {
|
|
|
|
#if defined(_WIN32)
|
|
|
|
#if defined(_WIN32)
|
|
|
@ -99,8 +98,6 @@ const auto create_directory = [](repertory::i_provider &provider,
|
|
|
|
repertory::utils::string::to_bool(meta2[repertory::META_PINNED]));
|
|
|
|
repertory::utils::string::to_bool(meta2[repertory::META_PINNED]));
|
|
|
|
EXPECT_EQ(std::uint64_t(0U),
|
|
|
|
EXPECT_EQ(std::uint64_t(0U),
|
|
|
|
repertory::utils::string::to_uint64(meta2[repertory::META_SIZE]));
|
|
|
|
repertory::utils::string::to_uint64(meta2[repertory::META_SIZE]));
|
|
|
|
EXPECT_STREQ((api_path + "_src").c_str(),
|
|
|
|
|
|
|
|
meta2[repertory::META_SOURCE].c_str());
|
|
|
|
|
|
|
|
EXPECT_EQ(getuid(), static_cast<uid_t>(repertory::utils::string::to_uint32(
|
|
|
|
EXPECT_EQ(getuid(), static_cast<uid_t>(repertory::utils::string::to_uint32(
|
|
|
|
meta2[repertory::META_UID])));
|
|
|
|
meta2[repertory::META_UID])));
|
|
|
|
EXPECT_EQ(date + 4U, repertory::utils::string::to_uint64(
|
|
|
|
EXPECT_EQ(date + 4U, repertory::utils::string::to_uint64(
|
|
|
@ -178,6 +175,9 @@ const auto decrypt_parts = [](const repertory::app_config &cfg,
|
|
|
|
|
|
|
|
|
|
|
|
namespace repertory {
|
|
|
|
namespace repertory {
|
|
|
|
static void can_create_and_remove_directory(i_provider &provider) {
|
|
|
|
static void can_create_and_remove_directory(i_provider &provider) {
|
|
|
|
|
|
|
|
fmt::println("testing|{}|{}",
|
|
|
|
|
|
|
|
app_config::get_provider_name(provider.get_provider_type()),
|
|
|
|
|
|
|
|
__FUNCTION__);
|
|
|
|
if (provider.is_read_only()) {
|
|
|
|
if (provider.is_read_only()) {
|
|
|
|
api_meta_map meta{};
|
|
|
|
api_meta_map meta{};
|
|
|
|
EXPECT_EQ(api_error::not_implemented,
|
|
|
|
EXPECT_EQ(api_error::not_implemented,
|
|
|
@ -196,6 +196,9 @@ static void can_create_and_remove_directory(i_provider &provider) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void create_directory_fails_if_already_exists(i_provider &provider) {
|
|
|
|
static void create_directory_fails_if_already_exists(i_provider &provider) {
|
|
|
|
|
|
|
|
fmt::println("testing|{}|{}",
|
|
|
|
|
|
|
|
app_config::get_provider_name(provider.get_provider_type()),
|
|
|
|
|
|
|
|
__FUNCTION__);
|
|
|
|
if (provider.is_read_only()) {
|
|
|
|
if (provider.is_read_only()) {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -210,6 +213,9 @@ static void create_directory_fails_if_already_exists(i_provider &provider) {
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
static void
|
|
|
|
create_directory_fails_if_file_already_exists(i_provider &provider) {
|
|
|
|
create_directory_fails_if_file_already_exists(i_provider &provider) {
|
|
|
|
|
|
|
|
fmt::println("testing|{}|{}",
|
|
|
|
|
|
|
|
app_config::get_provider_name(provider.get_provider_type()),
|
|
|
|
|
|
|
|
__FUNCTION__);
|
|
|
|
if (provider.is_read_only()) {
|
|
|
|
if (provider.is_read_only()) {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -223,6 +229,9 @@ create_directory_fails_if_file_already_exists(i_provider &provider) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void create_directory_clone_source_meta(i_provider &provider) {
|
|
|
|
static void create_directory_clone_source_meta(i_provider &provider) {
|
|
|
|
|
|
|
|
fmt::println("testing|{}|{}",
|
|
|
|
|
|
|
|
app_config::get_provider_name(provider.get_provider_type()),
|
|
|
|
|
|
|
|
__FUNCTION__);
|
|
|
|
if (provider.is_read_only()) {
|
|
|
|
if (provider.is_read_only()) {
|
|
|
|
EXPECT_EQ(api_error::not_implemented,
|
|
|
|
EXPECT_EQ(api_error::not_implemented,
|
|
|
|
provider.create_directory_clone_source_meta("/moose", "/moose"));
|
|
|
|
provider.create_directory_clone_source_meta("/moose", "/moose"));
|
|
|
@ -257,6 +266,9 @@ static void create_directory_clone_source_meta(i_provider &provider) {
|
|
|
|
|
|
|
|
|
|
|
|
static void create_directory_clone_source_meta_fails_if_already_exists(
|
|
|
|
static void create_directory_clone_source_meta_fails_if_already_exists(
|
|
|
|
i_provider &provider) {
|
|
|
|
i_provider &provider) {
|
|
|
|
|
|
|
|
fmt::println("testing|{}|{}",
|
|
|
|
|
|
|
|
app_config::get_provider_name(provider.get_provider_type()),
|
|
|
|
|
|
|
|
__FUNCTION__);
|
|
|
|
if (provider.is_read_only()) {
|
|
|
|
if (provider.is_read_only()) {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -272,6 +284,9 @@ static void create_directory_clone_source_meta_fails_if_already_exists(
|
|
|
|
|
|
|
|
|
|
|
|
static void create_directory_clone_source_meta_fails_if_directory_not_found(
|
|
|
|
static void create_directory_clone_source_meta_fails_if_directory_not_found(
|
|
|
|
i_provider &provider) {
|
|
|
|
i_provider &provider) {
|
|
|
|
|
|
|
|
fmt::println("testing|{}|{}",
|
|
|
|
|
|
|
|
app_config::get_provider_name(provider.get_provider_type()),
|
|
|
|
|
|
|
|
__FUNCTION__);
|
|
|
|
if (provider.is_read_only()) {
|
|
|
|
if (provider.is_read_only()) {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -282,6 +297,9 @@ static void create_directory_clone_source_meta_fails_if_directory_not_found(
|
|
|
|
|
|
|
|
|
|
|
|
static void create_directory_clone_source_meta_fails_if_file_already_exists(
|
|
|
|
static void create_directory_clone_source_meta_fails_if_file_already_exists(
|
|
|
|
i_provider &provider) {
|
|
|
|
i_provider &provider) {
|
|
|
|
|
|
|
|
fmt::println("testing|{}|{}",
|
|
|
|
|
|
|
|
app_config::get_provider_name(provider.get_provider_type()),
|
|
|
|
|
|
|
|
__FUNCTION__);
|
|
|
|
if (provider.is_read_only()) {
|
|
|
|
if (provider.is_read_only()) {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -297,6 +315,9 @@ static void create_directory_clone_source_meta_fails_if_file_already_exists(
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void can_create_and_remove_file(i_provider &provider) {
|
|
|
|
static void can_create_and_remove_file(i_provider &provider) {
|
|
|
|
|
|
|
|
fmt::println("testing|{}|{}",
|
|
|
|
|
|
|
|
app_config::get_provider_name(provider.get_provider_type()),
|
|
|
|
|
|
|
|
__FUNCTION__);
|
|
|
|
if (provider.is_read_only()) {
|
|
|
|
if (provider.is_read_only()) {
|
|
|
|
api_meta_map meta{};
|
|
|
|
api_meta_map meta{};
|
|
|
|
EXPECT_EQ(api_error::not_implemented,
|
|
|
|
EXPECT_EQ(api_error::not_implemented,
|
|
|
@ -317,6 +338,9 @@ static void can_create_and_remove_file(i_provider &provider) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void create_file_fails_if_already_exists(i_provider &provider) {
|
|
|
|
static void create_file_fails_if_already_exists(i_provider &provider) {
|
|
|
|
|
|
|
|
fmt::println("testing|{}|{}",
|
|
|
|
|
|
|
|
app_config::get_provider_name(provider.get_provider_type()),
|
|
|
|
|
|
|
|
__FUNCTION__);
|
|
|
|
if (provider.is_read_only()) {
|
|
|
|
if (provider.is_read_only()) {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -331,6 +355,9 @@ static void create_file_fails_if_already_exists(i_provider &provider) {
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
static void
|
|
|
|
create_file_fails_if_directory_already_exists(i_provider &provider) {
|
|
|
|
create_file_fails_if_directory_already_exists(i_provider &provider) {
|
|
|
|
|
|
|
|
fmt::println("testing|{}|{}",
|
|
|
|
|
|
|
|
app_config::get_provider_name(provider.get_provider_type()),
|
|
|
|
|
|
|
|
__FUNCTION__);
|
|
|
|
if (provider.is_read_only()) {
|
|
|
|
if (provider.is_read_only()) {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -345,9 +372,12 @@ create_file_fails_if_directory_already_exists(i_provider &provider) {
|
|
|
|
|
|
|
|
|
|
|
|
static void get_api_path_from_source(const app_config &cfg,
|
|
|
|
static void get_api_path_from_source(const app_config &cfg,
|
|
|
|
i_provider &provider) {
|
|
|
|
i_provider &provider) {
|
|
|
|
|
|
|
|
fmt::println("testing|{}|{}",
|
|
|
|
|
|
|
|
app_config::get_provider_name(provider.get_provider_type()),
|
|
|
|
|
|
|
|
__FUNCTION__);
|
|
|
|
if (provider.get_provider_type() == provider_type::encrypt) {
|
|
|
|
if (provider.get_provider_type() == provider_type::encrypt) {
|
|
|
|
const auto source_path =
|
|
|
|
auto source_path =
|
|
|
|
utils::path::combine("./test_date/encrypt", {"test.txt"});
|
|
|
|
utils::path::combine("./test_input/encrypt", {"test.txt"});
|
|
|
|
|
|
|
|
|
|
|
|
std::string api_path{};
|
|
|
|
std::string api_path{};
|
|
|
|
EXPECT_EQ(api_error::success,
|
|
|
|
EXPECT_EQ(api_error::success,
|
|
|
@ -376,6 +406,9 @@ static void get_api_path_from_source(const app_config &cfg,
|
|
|
|
static void
|
|
|
|
static void
|
|
|
|
get_api_path_from_source_fails_if_file_not_found(const app_config &cfg,
|
|
|
|
get_api_path_from_source_fails_if_file_not_found(const app_config &cfg,
|
|
|
|
i_provider &provider) {
|
|
|
|
i_provider &provider) {
|
|
|
|
|
|
|
|
fmt::println("testing|{}|{}",
|
|
|
|
|
|
|
|
app_config::get_provider_name(provider.get_provider_type()),
|
|
|
|
|
|
|
|
__FUNCTION__);
|
|
|
|
std::string source_path{};
|
|
|
|
std::string source_path{};
|
|
|
|
if (provider.get_provider_type() == provider_type::encrypt) {
|
|
|
|
if (provider.get_provider_type() == provider_type::encrypt) {
|
|
|
|
source_path = utils::path::combine(cfg.get_encrypt_config().path,
|
|
|
|
source_path = utils::path::combine(cfg.get_encrypt_config().path,
|
|
|
@ -391,13 +424,16 @@ get_api_path_from_source_fails_if_file_not_found(const app_config &cfg,
|
|
|
|
EXPECT_TRUE(api_path.empty());
|
|
|
|
EXPECT_TRUE(api_path.empty());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void get_directory_item_count(const app_config &cfg,
|
|
|
|
static void get_directory_item_count(const app_config & /* cfg */,
|
|
|
|
i_provider &provider) {
|
|
|
|
i_provider &provider) {
|
|
|
|
|
|
|
|
fmt::println("testing|{}|{}",
|
|
|
|
|
|
|
|
app_config::get_provider_name(provider.get_provider_type()),
|
|
|
|
|
|
|
|
__FUNCTION__);
|
|
|
|
if (provider.get_provider_type() == provider_type::encrypt) {
|
|
|
|
if (provider.get_provider_type() == provider_type::encrypt) {
|
|
|
|
EXPECT_EQ(std::size_t(2U), provider.get_directory_item_count("/"));
|
|
|
|
EXPECT_EQ(std::size_t(2U), provider.get_directory_item_count("/"));
|
|
|
|
EXPECT_EQ(std::size_t(0U), provider.get_directory_item_count("/not_found"));
|
|
|
|
EXPECT_EQ(std::size_t(0U), provider.get_directory_item_count("/not_found"));
|
|
|
|
|
|
|
|
|
|
|
|
const auto source_path =
|
|
|
|
auto source_path =
|
|
|
|
utils::path::combine(test::get_test_input_dir(), {"encrypt", "sub10"});
|
|
|
|
utils::path::combine(test::get_test_input_dir(), {"encrypt", "sub10"});
|
|
|
|
|
|
|
|
|
|
|
|
std::string api_path{};
|
|
|
|
std::string api_path{};
|
|
|
@ -408,6 +444,9 @@ static void get_directory_item_count(const app_config &cfg,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void get_directory_items(const app_config &cfg, i_provider &provider) {
|
|
|
|
static void get_directory_items(const app_config &cfg, i_provider &provider) {
|
|
|
|
|
|
|
|
fmt::println("testing|{}|{}",
|
|
|
|
|
|
|
|
app_config::get_provider_name(provider.get_provider_type()),
|
|
|
|
|
|
|
|
__FUNCTION__);
|
|
|
|
directory_item_list list{};
|
|
|
|
directory_item_list list{};
|
|
|
|
EXPECT_EQ(api_error::success, provider.get_directory_items("/", list));
|
|
|
|
EXPECT_EQ(api_error::success, provider.get_directory_items("/", list));
|
|
|
|
check_forced_dirs(list);
|
|
|
|
check_forced_dirs(list);
|
|
|
@ -443,7 +482,7 @@ static void get_directory_items(const app_config &cfg, i_provider &provider) {
|
|
|
|
EXPECT_EQ(std::size_t(46U), file->size);
|
|
|
|
EXPECT_EQ(std::size_t(46U), file->size);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
const auto source_path =
|
|
|
|
auto source_path =
|
|
|
|
utils::path::combine(cfg.get_encrypt_config().path, {"sub10"});
|
|
|
|
utils::path::combine(cfg.get_encrypt_config().path, {"sub10"});
|
|
|
|
std::string api_path{};
|
|
|
|
std::string api_path{};
|
|
|
|
EXPECT_EQ(api_error::success,
|
|
|
|
EXPECT_EQ(api_error::success,
|
|
|
@ -477,6 +516,9 @@ static void get_directory_items(const app_config &cfg, i_provider &provider) {
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
static void
|
|
|
|
get_directory_items_fails_if_directory_not_found(i_provider &provider) {
|
|
|
|
get_directory_items_fails_if_directory_not_found(i_provider &provider) {
|
|
|
|
|
|
|
|
fmt::println("testing|{}|{}",
|
|
|
|
|
|
|
|
app_config::get_provider_name(provider.get_provider_type()),
|
|
|
|
|
|
|
|
__FUNCTION__);
|
|
|
|
directory_item_list list{};
|
|
|
|
directory_item_list list{};
|
|
|
|
EXPECT_EQ(api_error::directory_not_found,
|
|
|
|
EXPECT_EQ(api_error::directory_not_found,
|
|
|
|
provider.get_directory_items("/not_found", list));
|
|
|
|
provider.get_directory_items("/not_found", list));
|
|
|
@ -485,8 +527,11 @@ get_directory_items_fails_if_directory_not_found(i_provider &provider) {
|
|
|
|
|
|
|
|
|
|
|
|
static void get_directory_items_fails_if_item_is_file(const app_config &cfg,
|
|
|
|
static void get_directory_items_fails_if_item_is_file(const app_config &cfg,
|
|
|
|
i_provider &provider) {
|
|
|
|
i_provider &provider) {
|
|
|
|
|
|
|
|
fmt::println("testing|{}|{}",
|
|
|
|
|
|
|
|
app_config::get_provider_name(provider.get_provider_type()),
|
|
|
|
|
|
|
|
__FUNCTION__);
|
|
|
|
if (provider.get_provider_type() == provider_type::encrypt) {
|
|
|
|
if (provider.get_provider_type() == provider_type::encrypt) {
|
|
|
|
const auto source_path =
|
|
|
|
auto source_path =
|
|
|
|
utils::path::combine(cfg.get_encrypt_config().path, {"test.txt"});
|
|
|
|
utils::path::combine(cfg.get_encrypt_config().path, {"test.txt"});
|
|
|
|
|
|
|
|
|
|
|
|
std::string api_path{};
|
|
|
|
std::string api_path{};
|
|
|
@ -501,8 +546,11 @@ static void get_directory_items_fails_if_item_is_file(const app_config &cfg,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void get_file(const app_config &cfg, i_provider &provider) {
|
|
|
|
static void get_file(const app_config &cfg, i_provider &provider) {
|
|
|
|
|
|
|
|
fmt::println("testing|{}|{}",
|
|
|
|
|
|
|
|
app_config::get_provider_name(provider.get_provider_type()),
|
|
|
|
|
|
|
|
__FUNCTION__);
|
|
|
|
if (provider.get_provider_type() == provider_type::encrypt) {
|
|
|
|
if (provider.get_provider_type() == provider_type::encrypt) {
|
|
|
|
const auto source_path =
|
|
|
|
auto source_path =
|
|
|
|
utils::path::combine(cfg.get_encrypt_config().path, {"test.txt"});
|
|
|
|
utils::path::combine(cfg.get_encrypt_config().path, {"test.txt"});
|
|
|
|
|
|
|
|
|
|
|
|
std::string api_path{};
|
|
|
|
std::string api_path{};
|
|
|
@ -526,14 +574,20 @@ static void get_file(const app_config &cfg, i_provider &provider) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void get_file_fails_if_file_not_found(i_provider &provider) {
|
|
|
|
static void get_file_fails_if_file_not_found(i_provider &provider) {
|
|
|
|
|
|
|
|
fmt::println("testing|{}|{}",
|
|
|
|
|
|
|
|
app_config::get_provider_name(provider.get_provider_type()),
|
|
|
|
|
|
|
|
__FUNCTION__);
|
|
|
|
api_file file{};
|
|
|
|
api_file file{};
|
|
|
|
EXPECT_EQ(api_error::item_not_found, provider.get_file("/not_found", file));
|
|
|
|
EXPECT_EQ(api_error::item_not_found, provider.get_file("/not_found", file));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void get_file_fails_if_item_is_directory(const app_config &cfg,
|
|
|
|
static void get_file_fails_if_item_is_directory(const app_config &cfg,
|
|
|
|
i_provider &provider) {
|
|
|
|
i_provider &provider) {
|
|
|
|
|
|
|
|
fmt::println("testing|{}|{}",
|
|
|
|
|
|
|
|
app_config::get_provider_name(provider.get_provider_type()),
|
|
|
|
|
|
|
|
__FUNCTION__);
|
|
|
|
if (provider.get_provider_type() == provider_type::encrypt) {
|
|
|
|
if (provider.get_provider_type() == provider_type::encrypt) {
|
|
|
|
const auto source_path =
|
|
|
|
auto source_path =
|
|
|
|
utils::path::combine(cfg.get_encrypt_config().path, {"sub10"});
|
|
|
|
utils::path::combine(cfg.get_encrypt_config().path, {"sub10"});
|
|
|
|
|
|
|
|
|
|
|
|
std::string api_path{};
|
|
|
|
std::string api_path{};
|
|
|
@ -630,16 +684,15 @@ static void run_tests(const app_config &cfg, i_provider &provider) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
TEST(providers_test, encrypt_provider) {
|
|
|
|
TEST(providers_test, encrypt_provider) {
|
|
|
|
const auto config_path =
|
|
|
|
auto config_path = utils::path::combine(test::get_test_output_dir(),
|
|
|
|
utils::path::combine(test::get_test_output_dir(), {"encrypt_provider"});
|
|
|
|
{"provider", "encrypt"});
|
|
|
|
|
|
|
|
|
|
|
|
console_consumer consumer{};
|
|
|
|
console_consumer consumer{};
|
|
|
|
event_system::instance().start();
|
|
|
|
event_system::instance().start();
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
app_config cfg(provider_type::encrypt, config_path);
|
|
|
|
app_config cfg(provider_type::encrypt, config_path);
|
|
|
|
|
|
|
|
|
|
|
|
const auto encrypt_path =
|
|
|
|
auto encrypt_path =
|
|
|
|
utils::path::combine(test::get_test_input_dir(), {"encrypt"});
|
|
|
|
utils::path::combine(test::get_test_input_dir(), {"encrypt"});
|
|
|
|
|
|
|
|
|
|
|
|
EXPECT_STREQ(
|
|
|
|
EXPECT_STREQ(
|
|
|
@ -674,8 +727,8 @@ TEST(providers_test, encrypt_provider) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
TEST(providers_test, s3_provider) {
|
|
|
|
TEST(providers_test, s3_provider) {
|
|
|
|
const auto config_path =
|
|
|
|
auto config_path =
|
|
|
|
utils::path::combine(test::get_test_output_dir(), {"s3_provider"});
|
|
|
|
utils::path::combine(test::get_test_output_dir(), {"provider", "s3"});
|
|
|
|
|
|
|
|
|
|
|
|
console_consumer consumer{};
|
|
|
|
console_consumer consumer{};
|
|
|
|
event_system::instance().start();
|
|
|
|
event_system::instance().start();
|
|
|
@ -685,7 +738,7 @@ TEST(providers_test, s3_provider) {
|
|
|
|
{
|
|
|
|
{
|
|
|
|
app_config src_cfg(
|
|
|
|
app_config src_cfg(
|
|
|
|
provider_type::s3,
|
|
|
|
provider_type::s3,
|
|
|
|
utils::path::combine(test::get_test_config_dir(), {"storj"}));
|
|
|
|
utils::path::combine(test::get_test_config_dir(), {"s3"}));
|
|
|
|
cfg.set_s3_config(src_cfg.get_s3_config());
|
|
|
|
cfg.set_s3_config(src_cfg.get_s3_config());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -714,8 +767,8 @@ TEST(providers_test, s3_provider) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
TEST(providers_test, sia_provider) {
|
|
|
|
TEST(providers_test, sia_provider) {
|
|
|
|
const auto config_path =
|
|
|
|
auto config_path =
|
|
|
|
utils::path::combine(test::get_test_output_dir(), {"sia_provider"});
|
|
|
|
utils::path::combine(test::get_test_output_dir(), {"sia", "provider"});
|
|
|
|
|
|
|
|
|
|
|
|
console_consumer consumer{};
|
|
|
|
console_consumer consumer{};
|
|
|
|
event_system::instance().start();
|
|
|
|
event_system::instance().start();
|
|
|
@ -753,5 +806,3 @@ TEST(providers_test, sia_provider) {
|
|
|
|
event_system::instance().stop();
|
|
|
|
event_system::instance().stop();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} // namespace repertory
|
|
|
|
} // namespace repertory
|
|
|
|
|
|
|
|
|
|
|
|
#endif // 0
|
|
|
|
|
|
|
|