proxygen
|
#include <wangle/acceptor/ConnectionManager.h>
#include <folly/io/Cursor.h>
#include <folly/io/async/EventBase.h>
#include <folly/io/async/TimeoutManager.h>
#include <folly/portability/GTest.h>
#include <proxygen/lib/http/codec/test/MockHTTPCodec.h>
#include <proxygen/lib/http/codec/test/TestUtils.h>
#include <proxygen/lib/http/session/HTTPDirectResponseHandler.h>
#include <proxygen/lib/http/session/HTTPDownstreamSession.h>
#include <proxygen/lib/http/session/HTTPSession.h>
#include <proxygen/lib/http/session/test/HTTPSessionMocks.h>
#include <proxygen/lib/http/session/test/HTTPSessionTest.h>
#include <proxygen/lib/http/session/test/MockSecondaryAuthManager.h>
#include <proxygen/lib/http/session/test/TestUtils.h>
#include <proxygen/lib/test/TestAsyncTransport.h>
#include <sstream>
#include <string>
#include <folly/io/async/test/MockAsyncTransport.h>
#include <vector>
#include <boost/optional/optional_io.hpp>
#include <fizz/record/Extensions.h>
#include <fizz/record/Types.h>
Go to the source code of this file.
Classes | |
class | MockCodecDownstreamTest |
Variables | |
const HTTPSettings | kDefaultIngressSettings |
const HTTPSettings | kIngressCertAuthSettings |
HTTPSettings | kEgressCertAuthSettings |
TEST_F | ( | MockCodecDownstreamTest | , |
OnAbortThenTimeouts | |||
) |
Definition at line 210 of file MockCodecDownstreamTest.cpp.
References testing::_, ASSERT_EQ, codec_, EXPECT_CALL, proxygen::fakeMockCodec(), proxygen::HTTPTransaction::getID(), proxygen::Exception::getProxygenError(), testing::Invoke(), proxygen::kErrorWriteTimeout, makeBuf(), proxygen::makeGetRequest(), folly::gen::move, testing::Return(), proxygen::HTTPHandlerBase::sendBody(), proxygen::HTTPHandlerBase::sendHeaders(), string, proxygen::HTTPTransaction::timeoutExpired(), proxygen::HTTPHandlerBase::txn_, and proxygen::Exception::what().
TEST_F | ( | MockCodecDownstreamTest | , |
ServerPush | |||
) |
Definition at line 283 of file MockCodecDownstreamTest.cpp.
References testing::_, codec_, EXPECT_CALL, proxygen::HTTPTransaction::getPriority(), handler(), testing::Invoke(), proxygen::makeGetRequest(), folly::gen::move, proxygen::HTTPTransaction::newPushedTransaction(), testing::Return(), proxygen::HTTPHandlerBase::sendBody(), proxygen::HTTPTransaction::sendEOM(), proxygen::MockHTTPPushHandler::sendPushHeaders(), proxygen::HTTPHandlerBase::sendReplyWithBody(), proxygen::HTTPHandlerBase::txn_, and uint64_t.
TEST_F | ( | MockCodecDownstreamTest | , |
ServerPushAfterGoaway | |||
) |
Definition at line 334 of file MockCodecDownstreamTest.cpp.
References testing::_, ASSERT_EQ, codec_, EXPECT_CALL, EXPECT_EQ, EXPECT_TRUE, proxygen::fakeMockCodec(), proxygen::HTTPTransaction::getID(), proxygen::HTTPTransaction::getPriority(), proxygen::Exception::getProxygenError(), handler(), proxygen::Exception::hasProxygenError(), testing::Invoke(), proxygen::kErrorStreamUnacknowledged, proxygen::makeGetRequest(), folly::gen::move, proxygen::HTTPTransaction::newPushedTransaction(), wangle::NO_ERROR, testing::Return(), proxygen::HTTPHandlerBase::sendBody(), proxygen::HTTPTransaction::sendEOM(), proxygen::MockHTTPPushHandler::sendPushHeaders(), proxygen::HTTPHandlerBase::sendReplyWithBody(), string, proxygen::HTTPHandlerBase::txn_, and proxygen::Exception::what().
TEST_F | ( | MockCodecDownstreamTest | , |
ServerPushAbort | |||
) |
Definition at line 414 of file MockCodecDownstreamTest.cpp.
References testing::_, ASSERT_EQ, codec_, EXPECT_CALL, EXPECT_EQ, EXPECT_TRUE, proxygen::fakeMockCodec(), proxygen::HTTPTransaction::getID(), proxygen::HTTPTransaction::getPriority(), proxygen::Exception::getProxygenError(), handler(), proxygen::Exception::hasProxygenError(), testing::Invoke(), proxygen::kErrorStreamAbort, proxygen::makeGetRequest(), folly::gen::move, proxygen::HTTPTransaction::newPushedTransaction(), testing::Return(), proxygen::HTTPHandlerBase::sendBody(), proxygen::HTTPTransaction::sendEOM(), proxygen::MockHTTPPushHandler::sendPushHeaders(), proxygen::HTTPHandlerBase::sendReplyWithBody(), string, proxygen::HTTPHandlerBase::txn_, and proxygen::Exception::what().
TEST_F | ( | MockCodecDownstreamTest | , |
ServerPushAbortAssoc | |||
) |
Definition at line 487 of file MockCodecDownstreamTest.cpp.
References testing::_, ASSERT_EQ, codec_, EXPECT_CALL, EXPECT_EQ, EXPECT_TRUE, proxygen::fakeMockCodec(), proxygen::HTTPTransaction::getPriority(), proxygen::Exception::getProxygenError(), handler(), proxygen::Exception::hasProxygenError(), testing::Invoke(), proxygen::kErrorStreamAbort, proxygen::makeGetRequest(), folly::gen::move, proxygen::HTTPTransaction::newPushedTransaction(), testing::Return(), proxygen::HTTPHandlerBase::sendBody(), proxygen::MockHTTPPushHandler::sendPushHeaders(), string, proxygen::HTTPHandlerBase::txn_, and proxygen::Exception::what().
TEST_F | ( | MockCodecDownstreamTest | , |
ServerPushClientMessage | |||
) |
Definition at line 571 of file MockCodecDownstreamTest.cpp.
References testing::_, ASSERT_EQ, codec_, EXPECT_CALL, EXPECT_EQ, EXPECT_TRUE, proxygen::HTTPException::getCodecStatusCode(), proxygen::HTTPTransaction::getPriority(), handler(), proxygen::HTTPException::hasCodecStatusCode(), testing::Invoke(), testing::InvokeWithoutArgs(), std::tr1::make_tuple(), proxygen::makeGetRequest(), folly::gen::move, proxygen::HTTPTransaction::newPushedTransaction(), testing::Return(), proxygen::HTTPHandlerBase::sendReplyWithBody(), string, proxygen::HTTPHandlerBase::txn_, uint64_t, and proxygen::Exception::what().
TEST_F | ( | MockCodecDownstreamTest | , |
ReadTimeout | |||
) |
Definition at line 636 of file MockCodecDownstreamTest.cpp.
References testing::_, codec_, EXPECT_CALL, EXPECT_EQ, proxygen::fakeMockCodec(), testing::Invoke(), proxygen::makeGetRequest(), folly::gen::move, proxygen::HTTPTransaction::pauseIngress(), proxygen::HTTPTransaction::resumeIngress(), testing::Return(), proxygen::HTTPHandlerBase::sendReplyWithBody(), wangle::TIMEOUT, transport_, proxygen::HTTPHandlerBase::txn_, and folly::AsyncWriter::WriteCallback::writeSuccess().
TEST_F | ( | MockCodecDownstreamTest | , |
Ping | |||
) |
Definition at line 697 of file MockCodecDownstreamTest.cpp.
References testing::_, codec_, EXPECT_CALL, testing::Invoke(), testing::InvokeWithoutArgs(), proxygen::makeGetRequest(), folly::gen::move, testing::Return(), proxygen::HTTPHandlerBase::sendReplyWithBody(), and proxygen::HTTPHandlerBase::txn_.
TEST_F | ( | MockCodecDownstreamTest | , |
FlowControlAbort | |||
) |
Definition at line 735 of file MockCodecDownstreamTest.cpp.
References testing::_, codec_, EXPECT_CALL, testing::Invoke(), testing::InvokeWithoutArgs(), proxygen::http2::kInitialWindow, makeBuf(), proxygen::makePostRequest(), folly::gen::move, testing::Return(), proxygen::HTTPTransaction::sendAbort(), and proxygen::HTTPHandlerBase::txn_.
TEST_F | ( | MockCodecDownstreamTest | , |
Buffering | |||
) |
Definition at line 771 of file MockCodecDownstreamTest.cpp.
References testing::_, codec_, EXPECT_CALL, proxygen::fakeMockCodec(), handler(), i, testing::Invoke(), testing::InvokeWithoutArgs(), makeBuf(), proxygen::makePostRequest(), folly::gen::move, testing::Return(), transport_, and folly::AsyncWriter::WriteCallback::writeSuccess().
TEST_F | ( | MockCodecDownstreamTest | , |
SpdyWindow | |||
) |
Definition at line 826 of file MockCodecDownstreamTest.cpp.
References testing::_, codec_, EXPECT_CALL, EXPECT_TRUE, proxygen::fakeMockCodec(), proxygen::HTTPTransaction::getLocalAddress(), testing::Invoke(), testing::InvokeWithoutArgs(), proxygen::makeGetRequest(), folly::gen::move, testing::Return(), proxygen::HTTPHandlerBase::sendBody(), proxygen::HTTPTransaction::sendEOM(), proxygen::HTTPHandlerBase::sendHeaders(), stream, transport_, proxygen::HTTPHandlerBase::txn_, and folly::AsyncWriter::WriteCallback::writeSuccess().
TEST_F | ( | MockCodecDownstreamTest | , |
DoubleResume | |||
) |
Definition at line 912 of file MockCodecDownstreamTest.cpp.
References testing::_, codec_, EXPECT_CALL, EXPECT_EQ, proxygen::fakeMockCodec(), testing::Invoke(), testing::InvokeWithoutArgs(), makeBuf(), proxygen::makePostRequest(), folly::gen::move, proxygen::HTTPTransaction::pauseIngress(), proxygen::HTTPTransaction::resumeIngress(), testing::Return(), proxygen::HTTPHandlerBase::sendReplyWithBody(), transport_, proxygen::HTTPHandlerBase::txn_, and folly::AsyncWriter::WriteCallback::writeSuccess().
TEST_F | ( | MockCodecDownstreamTest | , |
ConnFlowControlBlocked | |||
) |
Definition at line 1083 of file MockCodecDownstreamTest.cpp.
TEST_F | ( | MockCodecDownstreamTest | , |
ConnFlowControlTimeout | |||
) |
Definition at line 1087 of file MockCodecDownstreamTest.cpp.
TEST_F | ( | MockCodecDownstreamTest | , |
UnpausedLargePost | |||
) |
Definition at line 1091 of file MockCodecDownstreamTest.cpp.
References testing::_, codec_, EXPECT_CALL, i, proxygen::http2::kInitialWindow, makeBuf(), proxygen::makePostRequest(), folly::gen::move, and testing::Return().
TEST_F | ( | MockCodecDownstreamTest | , |
IngressPausedWindowUpdate | |||
) |
Definition at line 1129 of file MockCodecDownstreamTest.cpp.
References testing::_, codec_, EXPECT_CALL, EXPECT_EQ, EXPECT_TRUE, testing::Invoke(), testing::InvokeWithoutArgs(), proxygen::http2::kInitialWindow, proxygen::makeGetRequest(), proxygen::makeResponse(), folly::gen::move, and testing::Return().
TEST_F | ( | MockCodecDownstreamTest | , |
ShutdownThenSendPushHeaders | |||
) |
Definition at line 1181 of file MockCodecDownstreamTest.cpp.
References testing::_, codec_, EXPECT_CALL, EXPECT_TRUE, handler(), testing::Invoke(), proxygen::makeGetRequest(), folly::gen::move, testing::Return(), proxygen::MockHTTPPushHandler::sendPushHeaders(), and proxygen::HTTPHandlerBase::txn_.
TEST_F | ( | MockCodecDownstreamTest | , |
ReadIobufChainShutdown | |||
) |
Definition at line 1235 of file MockCodecDownstreamTest.cpp.
References testing::_, codec_, EXPECT_CALL, EXPECT_FALSE, EXPECT_TRUE, f, testing::Invoke(), folly::IOBuf::isChained(), and folly::IOBuf::length().
TEST_F | ( | MockCodecDownstreamTest | , |
SendDoubleGoawayTimeout | |||
) |
Definition at line 1349 of file MockCodecDownstreamTest.cpp.
TEST_F | ( | MockCodecDownstreamTest | , |
SendDoubleGoawayIdle | |||
) |
Definition at line 1352 of file MockCodecDownstreamTest.cpp.
TEST_F | ( | MockCodecDownstreamTest | , |
SendGoawayTimeout | |||
) |
Definition at line 1355 of file MockCodecDownstreamTest.cpp.
TEST_F | ( | MockCodecDownstreamTest | , |
SendGoawayIdle | |||
) |
Definition at line 1358 of file MockCodecDownstreamTest.cpp.
TEST_F | ( | MockCodecDownstreamTest | , |
DropConnection | |||
) |
Definition at line 1362 of file MockCodecDownstreamTest.cpp.
References testing::_, testing::Assign(), testing::AtLeast(), codec_, EXPECT_CALL, handler(), and transport_.
TEST_F | ( | MockCodecDownstreamTest | , |
DropConnectionNogoaway | |||
) |
Definition at line 1376 of file MockCodecDownstreamTest.cpp.
References testing::_, testing::Assign(), testing::AtLeast(), codec_, EXPECT_CALL, handler(), and transport_.
TEST_F | ( | MockCodecDownstreamTest | , |
ShutdownThenError | |||
) |
Definition at line 1390 of file MockCodecDownstreamTest.cpp.
References testing::_, dummy(), EXPECT_CALL, proxygen::getGetRequest(), testing::Return(), and proxygen::HTTPException::setHttpStatusCode().
TEST_F | ( | MockCodecDownstreamTest | , |
PingDuringShutdown | |||
) |
Definition at line 1414 of file MockCodecDownstreamTest.cpp.
References testing::_, codec_, dummy(), EXPECT_CALL, and testing::Return().
TEST_F | ( | MockCodecDownstreamTest | , |
SettingsAck | |||
) |
Definition at line 1435 of file MockCodecDownstreamTest.cpp.
References testing::_, codec_, and EXPECT_CALL.
TEST_F | ( | MockCodecDownstreamTest | , |
TestSendCertificateRequest | |||
) |
Definition at line 1444 of file MockCodecDownstreamTest.cpp.
References testing::_, codec_, folly::IOBuf::copyBuffer(), fizz::encodeExtension(), EXPECT_CALL, EXPECT_EQ, testing::InvokeWithoutArgs(), kEgressCertAuthSettings, kIngressCertAuthSettings, folly::gen::move, testing::Return(), and fizz::SignatureAlgorithms::supported_signature_algorithms.
const HTTPSettings kDefaultIngressSettings |
Definition at line 42 of file MockCodecDownstreamTest.cpp.
Referenced by proxygen::makeMockParallelCodec(), and MockCodecDownstreamTest::MockCodecDownstreamTest().
HTTPSettings kEgressCertAuthSettings |
Definition at line 48 of file MockCodecDownstreamTest.cpp.
Referenced by TEST_F().
const HTTPSettings kIngressCertAuthSettings |
Definition at line 45 of file MockCodecDownstreamTest.cpp.
Referenced by TEST_F().