| 32 | }; |
| 33 | |
| 34 | TEST(HTTP, GetCachedNotFollowingRedirect) { |
| 35 | asio::io_context ioContext; |
| 36 | TestCache cache{&ioContext}; |
| 37 | bool done = false; |
| 38 | bool ok = false; |
| 39 | cache.TestGetCached(redirectingUrl, [&done, &ok](const bool res, const std::string&) { |
| 40 | done = true; |
| 41 | ok = res; |
| 42 | }, 0); |
| 43 | const size_t events = ioContext.run_for(timeout); |
| 44 | EXPECT_GT(events, 1u); |
| 45 | EXPECT_TRUE(done); |
| 46 | EXPECT_FALSE(ok); // redirect is not OK |
| 47 | } |
| 48 | |
| 49 | TEST(HTTP, GetCachedFollowRedirect) { |
| 50 | asio::io_context ioContext; |
nothing calls this directly
no test coverage detected