unit tests and fixes
Some checks are pending
BlockStorage/repertory_linux_builds/pipeline/head Build queued...
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good

This commit is contained in:
Scott E. Graves 2023-11-12 14:33:19 -06:00
parent 821ed7b25e
commit 103dae6d08
2 changed files with 10 additions and 0 deletions

View File

@ -362,6 +362,15 @@ auto s3_provider::get_directory_items(const std::string &api_path,
directory_item_list &list) const
-> api_error {
try {
bool exists{};
auto res = is_directory(api_path, exists);
if (res != api_error::success) {
return res;
}
if (not exists) {
return api_error::directory_not_found;
}
const auto cfg = get_config().get_s3_config();
const auto is_encrypted = not cfg.encryption_token.empty();
std::string key;

View File

@ -294,6 +294,7 @@ static void get_api_path_from_source(const app_config &cfg,
provider.get_api_path_from_source(fsi.source_path, api_path));
EXPECT_STREQ("/pt01.txt", api_path.c_str());
EXPECT_EQ(api_error::success, provider.remove_file("/pt01.txt"));
}
static void