[unit test] Complete all providers unit tests #12

This commit is contained in:
2025-09-18 17:33:26 -05:00
parent 37c036a2d7
commit 1fbdf19269
2 changed files with 6 additions and 0 deletions

View File

@@ -1204,6 +1204,8 @@ auto s3_provider::upload_file_impl(const std::string &api_path,
return api_error::comm_error;
}
file_size = opt_size.value();
} else {
return api_error::item_not_found;
}
const auto &cfg{get_s3_config()};

View File

@@ -900,6 +900,10 @@ auto sia_provider::upload_file_impl(const std::string &api_path,
stop_type &stop_requested) -> api_error {
REPERTORY_USES_FUNCTION_NAME();
if (not utils::file::file{source_path}.exists()) {
return api_error::item_not_found;
}
curl::requests::http_put_file put_file{};
put_file.path = "/api/worker/object" + api_path;
put_file.query["bucket"] = get_sia_config().bucket;