forked from envoyproxy/envoy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tcp_proxy_integration_test.h
40 lines (31 loc) · 1.19 KB
/
tcp_proxy_integration_test.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#pragma once
#include <memory>
#include <string>
#include "test/integration/integration.h"
#include "test/mocks/secret/mocks.h"
#include "gtest/gtest.h"
namespace Envoy {
class TcpProxyIntegrationTest : public testing::TestWithParam<Network::Address::IpVersion>,
public BaseIntegrationTest {
public:
TcpProxyIntegrationTest() : BaseIntegrationTest(GetParam(), ConfigHelper::tcpProxyConfig()) {
enable_half_close_ = true;
}
void initialize() override;
};
class TcpProxySslIntegrationTest : public TcpProxyIntegrationTest {
public:
void initialize() override;
void setupConnections();
void sendAndReceiveTlsData(const std::string& data_to_send_upstream,
const std::string& data_to_send_downstream);
std::unique_ptr<Ssl::ContextManager> context_manager_;
Network::TransportSocketFactoryPtr context_;
ConnectionStatusCallbacks connect_callbacks_;
MockWatermarkBuffer* client_write_buffer_;
std::shared_ptr<WaitForPayloadReader> payload_reader_;
testing::NiceMock<Secret::MockSecretManager> secret_manager_;
Network::ClientConnectionPtr ssl_client_;
FakeRawConnectionPtr fake_upstream_connection_;
};
} // namespace Envoy