[unit test] Complete all providers unit tests #12
This commit is contained in:
@@ -1523,14 +1523,20 @@ static void rename_file_fails_if_destination_exists(i_provider &provider) {
|
|||||||
__FUNCTION__);
|
__FUNCTION__);
|
||||||
|
|
||||||
if (not provider.is_rename_supported()) {
|
if (not provider.is_rename_supported()) {
|
||||||
create_file(provider, "/rn_src_conflict.txt");
|
if (provider.get_provider_type() != provider_type::encrypt) {
|
||||||
create_file(provider, "/rn_dst_conflict.txt");
|
create_file(provider, "/rn_src_conflict.txt");
|
||||||
|
create_file(provider, "/rn_dst_conflict.txt");
|
||||||
|
}
|
||||||
auto res =
|
auto res =
|
||||||
provider.rename_file("/rn_src_conflict.txt", "/rn_dst_conflict.txt");
|
provider.rename_file("/rn_src_conflict.txt", "/rn_dst_conflict.txt");
|
||||||
EXPECT_EQ(api_error::not_implemented, res);
|
EXPECT_EQ(api_error::not_implemented, res);
|
||||||
|
|
||||||
EXPECT_EQ(api_error::success, provider.remove_file("/rn_src_conflict.txt"));
|
if (provider.get_provider_type() != provider_type::encrypt) {
|
||||||
EXPECT_EQ(api_error::success, provider.remove_file("/rn_dst_conflict.txt"));
|
EXPECT_EQ(api_error::success,
|
||||||
|
provider.remove_file("/rn_src_conflict.txt"));
|
||||||
|
EXPECT_EQ(api_error::success,
|
||||||
|
provider.remove_file("/rn_dst_conflict.txt"));
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user