[all] Do not set Response data for 404s
For AssetFileSource and the node FileSource this was already the case; this makes the other implementations consistent.
This commit is contained in:
@@ -47,9 +47,8 @@ TEST_F(Storage, HTTP404) {
|
||||
EXPECT_TRUE(util::ThreadContext::currentlyOn(util::ThreadType::Main));
|
||||
ASSERT_NE(nullptr, res.error);
|
||||
EXPECT_EQ(Response::Error::Reason::NotFound, res.error->reason);
|
||||
ASSERT_TRUE(res.data.get());
|
||||
EXPECT_EQ("Cannot GET /doesnotexist\n", *res.data);
|
||||
EXPECT_EQ("HTTP status code 404", res.error->message);
|
||||
EXPECT_FALSE(bool(res.data));
|
||||
EXPECT_FALSE(bool(res.expires));
|
||||
EXPECT_FALSE(bool(res.modified));
|
||||
EXPECT_FALSE(bool(res.etag));
|
||||
@@ -74,9 +73,8 @@ TEST_F(Storage, HTTP500) {
|
||||
EXPECT_TRUE(util::ThreadContext::currentlyOn(util::ThreadType::Main));
|
||||
ASSERT_NE(nullptr, res.error);
|
||||
EXPECT_EQ(Response::Error::Reason::Server, res.error->reason);
|
||||
ASSERT_TRUE(res.data.get());
|
||||
EXPECT_EQ("Server Error!", *res.data);
|
||||
EXPECT_EQ("HTTP status code 500", res.error->message);
|
||||
EXPECT_FALSE(bool(res.data));
|
||||
EXPECT_FALSE(bool(res.expires));
|
||||
EXPECT_FALSE(bool(res.modified));
|
||||
EXPECT_FALSE(bool(res.etag));
|
||||
|
||||
Reference in New Issue
Block a user