MCPcopy Create free account
hub / github.com/black-sliver/PopTracker / TEST

Function TEST

test/http/test_http_cache.cpp:34–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32};
33
34TEST(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
49TEST(HTTP, GetCachedFollowRedirect) {
50 asio::io_context ioContext;

Callers

nothing calls this directly

Calls 3

TestGetCachedMethod · 0.80
run_forMethod · 0.80
restartMethod · 0.80

Tested by

no test coverage detected