| 193 | } |
| 194 | |
| 195 | void TestStatus(bool use_html) { |
| 196 | std::string expect_type = (use_html ? "text/html" : "text/plain"); |
| 197 | brpc::StatusService service; |
| 198 | brpc::StatusRequest req; |
| 199 | brpc::StatusResponse res; |
| 200 | brpc::Controller cntl; |
| 201 | ClosureChecker done; |
| 202 | SetUpController(&cntl, use_html); |
| 203 | EchoServiceImpl echo_svc; |
| 204 | ASSERT_EQ(0, _server.AddService( |
| 205 | &echo_svc, brpc::SERVER_DOESNT_OWN_SERVICE)); |
| 206 | service.default_method(&cntl, &req, &res, &done); |
| 207 | EXPECT_FALSE(cntl.Failed()); |
| 208 | EXPECT_EQ(expect_type, cntl.http_response().content_type()); |
| 209 | ASSERT_EQ(0, _server.RemoveService(&echo_svc)); |
| 210 | } |
| 211 | |
| 212 | void TestVLog(bool use_html) { |
| 213 | #if !BRPC_WITH_GLOG |
nothing calls this directly
no test coverage detected