proxygen
HTTPSessionAcceptorTestBase Class Reference
Inheritance diagram for HTTPSessionAcceptorTestBase:
HTTPSessionAcceptorTestNPN HTTPSessionAcceptorTestNPNJunk HTTPSessionAcceptorTestNPNPlaintext

Public Member Functions

virtual void setupSSL ()
 
void SetUp () override
 
void newAcceptor ()
 

Protected Attributes

std::unique_ptr< AcceptorConfigurationconfig_
 
wangle::SSLContextConfig sslCtxConfig_
 
std::unique_ptr< HTTPTargetSessionAcceptoracceptor_
 
folly::EventBase eventBase_
 
folly::test::MockAsyncServerSocket mockServerSocket_
 

Detailed Description

Definition at line 70 of file HTTPSessionAcceptorTest.cpp.

Member Function Documentation

void HTTPSessionAcceptorTestBase::newAcceptor ( )
inline

Definition at line 92 of file HTTPSessionAcceptorTest.cpp.

References testing::_, acceptor_, and EXPECT_CALL.

92  {
93  acceptor_ = std::make_unique<HTTPTargetSessionAcceptor>(*config_);
94  EXPECT_CALL(mockServerSocket_, addAcceptCallback(_, _, _));
96  }
#define EXPECT_CALL(obj, call)
const internal::AnythingMatcher _
std::unique_ptr< HTTPTargetSessionAcceptor > acceptor_
folly::test::MockAsyncServerSocket mockServerSocket_
void HTTPSessionAcceptorTestBase::SetUp ( )
inlineoverride

Definition at line 84 of file HTTPSessionAcceptorTest.cpp.

References config_.

84  {
85  config_ = std::make_unique<AcceptorConfiguration>();
86  SocketAddress address("127.0.0.1", 0);
87  config_->bindAddress = address;
88  setupSSL();
89  newAcceptor();
90  }
std::unique_ptr< AcceptorConfiguration > config_
virtual void HTTPSessionAcceptorTestBase::setupSSL ( )
inlinevirtual

Definition at line 74 of file HTTPSessionAcceptorTest.cpp.

References config_.

74  {
76  kTestDir + "test_cert1.pem",
77  kTestDir + "test_cert1.key",
78  "");
79 
80  sslCtxConfig_.isDefault = true;
81  config_->sslContextConfigs.emplace_back(sslCtxConfig_);
82  }
std::unique_ptr< AcceptorConfiguration > config_
void setCertificate(const std::string &certPath, const std::string &keyPath, const std::string &passwordPath)
wangle::SSLContextConfig sslCtxConfig_

Member Data Documentation

std::unique_ptr<HTTPTargetSessionAcceptor> HTTPSessionAcceptorTestBase::acceptor_
protected

Definition at line 101 of file HTTPSessionAcceptorTest.cpp.

std::unique_ptr<AcceptorConfiguration> HTTPSessionAcceptorTestBase::config_
protected

Definition at line 99 of file HTTPSessionAcceptorTest.cpp.

folly::EventBase HTTPSessionAcceptorTestBase::eventBase_
protected

Definition at line 102 of file HTTPSessionAcceptorTest.cpp.

folly::test::MockAsyncServerSocket HTTPSessionAcceptorTestBase::mockServerSocket_
protected

Definition at line 103 of file HTTPSessionAcceptorTest.cpp.

wangle::SSLContextConfig HTTPSessionAcceptorTestBase::sslCtxConfig_
protected

Definition at line 100 of file HTTPSessionAcceptorTest.cpp.


The documentation for this class was generated from the following file: