Skip to content

Commit

Permalink
test: some fixes for Google import. (#5122)
Browse files Browse the repository at this point in the history
Signed-off-by: Harvey Tuch <[email protected]>
  • Loading branch information
htuch authored Nov 26, 2018
1 parent a59709c commit 2c0733a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions test/common/ssl/ssl_socket_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,12 @@ const std::string testUtilV2(
Network::MockConnectionCallbacks server_connection_callbacks;
EXPECT_CALL(callbacks, onAccept_(_, _))
.WillOnce(Invoke([&](Network::ConnectionSocketPtr& socket, bool) -> void {
// TODO(htuch): remove std::string(..) wrappers when Google's string
// implementation converges with std::string.
std::string sni = transport_socket_options != NULL &&
transport_socket_options->serverNameOverride().has_value()
? transport_socket_options->serverNameOverride().value()
: client_ctx_proto.sni();
? std::string(transport_socket_options->serverNameOverride().value())
: std::string(client_ctx_proto.sni());
socket->setRequestedServerName(sni);
Network::ConnectionPtr new_connection = dispatcher.createServerConnection(
std::move(socket), server_ssl_socket_factory.createTransportSocket(nullptr));
Expand Down
3 changes: 2 additions & 1 deletion test/config/integration/certs/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ licenses(["notice"]) # Apache 2

load(
"//bazel:envoy_build_system.bzl",
"envoy_cc_test_library",
"envoy_package",
)

Expand All @@ -12,7 +13,7 @@ filegroup(
srcs = glob(["*.pem"]),
)

cc_library(
envoy_cc_test_library(
name = "hashes",
hdrs = glob(["*hash.h"]),
)

0 comments on commit 2c0733a

Please sign in to comment.