| 107 | } |
| 108 | |
| 109 | Y_UNIT_TEST(TTestAnyHttpCodeIsAccepted) { |
| 110 | auto responseWith523 = [](const IRequestRef& req) { |
| 111 | auto* httpReq = dynamic_cast<IHttpRequest*>(req.Get()); |
| 112 | |
| 113 | TData data; |
| 114 | httpReq->SendReply(data, {}, 523); |
| 115 | }; |
| 116 | |
| 117 | TServ serv = CreateServices(responseWith523); |
| 118 | NNeh::THandleRef handle = NNeh::Request(TStringBuilder() << "http://localhost:" << serv.ServerPort << "/pipeline?", nullptr); |
| 119 | auto resp = handle->Wait(); |
| 120 | |
| 121 | UNIT_ASSERT(resp); |
| 122 | UNIT_ASSERT(resp->IsError()); |
| 123 | UNIT_ASSERT_EQUAL(resp->GetErrorCode(), 523); |
| 124 | } |
| 125 | |
| 126 | Y_UNIT_TEST(TPipelineRequests) { |
| 127 | TServ serv = CreateServices(); |
nothing calls this directly
no test coverage detected