[unit test] Complete all providers unit tests #12
This commit is contained in:
@@ -753,7 +753,6 @@ static void get_file_size(i_provider &provider) {
|
|||||||
auto &file = test::create_random_file(128U);
|
auto &file = test::create_random_file(128U);
|
||||||
auto api_path =
|
auto api_path =
|
||||||
fmt::format("/{}", utils::path::strip_to_file_name(file.get_path()));
|
fmt::format("/{}", utils::path::strip_to_file_name(file.get_path()));
|
||||||
create_file(provider, api_path);
|
|
||||||
|
|
||||||
stop_type stop_requested{false};
|
stop_type stop_requested{false};
|
||||||
auto res = provider.upload_file(api_path, file.get_path(), stop_requested);
|
auto res = provider.upload_file(api_path, file.get_path(), stop_requested);
|
||||||
@@ -812,7 +811,6 @@ static void get_filesystem_item(i_provider &provider) {
|
|||||||
auto &src = test::create_random_file(128U);
|
auto &src = test::create_random_file(128U);
|
||||||
auto api_path =
|
auto api_path =
|
||||||
fmt::format("/{}", utils::path::strip_to_file_name(src.get_path()));
|
fmt::format("/{}", utils::path::strip_to_file_name(src.get_path()));
|
||||||
create_file(provider, api_path);
|
|
||||||
|
|
||||||
stop_type stop_requested{false};
|
stop_type stop_requested{false};
|
||||||
auto res = provider.upload_file(api_path, src.get_path(), stop_requested);
|
auto res = provider.upload_file(api_path, src.get_path(), stop_requested);
|
||||||
@@ -885,8 +883,6 @@ static void get_filesystem_item_from_source_path(const app_config &cfg,
|
|||||||
fmt::format("/{}", utils::path::strip_to_file_name(file.get_path()));
|
fmt::format("/{}", utils::path::strip_to_file_name(file.get_path()));
|
||||||
source_path = file.get_path();
|
source_path = file.get_path();
|
||||||
|
|
||||||
create_file(provider, api_path);
|
|
||||||
|
|
||||||
EXPECT_EQ(
|
EXPECT_EQ(
|
||||||
api_error::success,
|
api_error::success,
|
||||||
provider.set_item_meta(api_path, {
|
provider.set_item_meta(api_path, {
|
||||||
@@ -911,7 +907,7 @@ static void get_filesystem_item_from_source_path(const app_config &cfg,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void get_filesystem_item_from_source_path_fails_if_file_is_not_found(
|
static void get_filesystem_item_from_source_path_fails_if_file_is_not_found(
|
||||||
app_config &cfg, i_provider &provider) {
|
i_provider &provider) {
|
||||||
fmt::println("testing|{}|{}",
|
fmt::println("testing|{}|{}",
|
||||||
app_config::get_provider_name(provider.get_provider_type()),
|
app_config::get_provider_name(provider.get_provider_type()),
|
||||||
__FUNCTION__);
|
__FUNCTION__);
|
||||||
|
Reference in New Issue
Block a user