[core] std::shared_ptr<const Response> ⇢ const Response&
This commit is contained in:
@@ -64,8 +64,8 @@ TEST_F(Storage, CacheNotFound) {
|
||||
const Resource resource{ Resource::Unknown, "http://127.0.0.1:3000/not-found" };
|
||||
|
||||
// Insert existing data into the cache that will be marked as stale.
|
||||
auto response = std::make_shared<Response>();
|
||||
response->data = std::make_shared<const std::string>("existing data");
|
||||
Response response;
|
||||
response.data = std::make_shared<const std::string>("existing data");
|
||||
cache.put(resource, response, SQLiteCache::Hint::Full);
|
||||
|
||||
std::unique_ptr<FileRequest> req1;
|
||||
@@ -122,8 +122,8 @@ TEST_F(Storage, DontCacheConnectionErrors) {
|
||||
const Resource resource{ Resource::Unknown, "http://127.0.0.1:3001" };
|
||||
|
||||
// Insert existing data into the cache that will be marked as stale.
|
||||
auto response = std::make_shared<Response>();
|
||||
response->data = std::make_shared<const std::string>("existing data");
|
||||
Response response;
|
||||
response.data = std::make_shared<const std::string>("existing data");
|
||||
cache.put(resource, response, SQLiteCache::Hint::Full);
|
||||
|
||||
std::unique_ptr<FileRequest> req1;
|
||||
@@ -178,8 +178,8 @@ TEST_F(Storage, DontCacheServerErrors) {
|
||||
const Resource resource{ Resource::Unknown, "http://127.0.0.1:3000/permanent-error" };
|
||||
|
||||
// Insert existing data into the cache that will be marked as stale.
|
||||
auto response = std::make_shared<Response>();
|
||||
response->data = std::make_shared<const std::string>("existing data");
|
||||
Response response;
|
||||
response.data = std::make_shared<const std::string>("existing data");
|
||||
cache.put(resource, response, SQLiteCache::Hint::Full);
|
||||
|
||||
std::unique_ptr<FileRequest> req1;
|
||||
|
||||
Reference in New Issue
Block a user