From 676c4ce0a1ed29ecfa78c1c81f0fceae75b263e8 Mon Sep 17 00:00:00 2001 From: Henna Huang Date: Wed, 31 May 2017 21:33:25 -0400 Subject: [PATCH] Update echo2 test --- WORKSPACE | 1 + echo2_integration_test.cc | 6 +++--- echo2_server.json | 4 +++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index 72c48778f..2561b3521 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -9,4 +9,5 @@ load("@envoy//bazel:repositories.bzl", "envoy_dependencies") load("@envoy//bazel:cc_configure.bzl", "cc_configure") envoy_dependencies() + cc_configure() diff --git a/echo2_integration_test.cc b/echo2_integration_test.cc index 8d037663d..1096f38df 100644 --- a/echo2_integration_test.cc +++ b/echo2_integration_test.cc @@ -9,7 +9,7 @@ class Echo2IntegrationTest : public BaseIntegrationTest, * Initializer for an individual integration test. */ void SetUp() override { - createTestServer("echo2_server.json", GetParam(), {"echo"}); + createTestServer("echo2_server.json", {"echo"}, GetParam()); } /** @@ -26,12 +26,12 @@ INSTANTIATE_TEST_CASE_P(IpVersions, Echo2IntegrationTest, TEST_P(Echo2IntegrationTest, Echo) { Buffer::OwnedImpl buffer("hello"); std::string response; - RawConnectionDriver connection(lookupPort("echo"), GetParam(), buffer, + RawConnectionDriver connection(lookupPort("echo"), buffer, [&](Network::ClientConnection&, const Buffer::Instance& data) -> void { response.append(TestUtility::bufferToString(data)); connection.close(); - }); + }, GetParam()); connection.run(); EXPECT_EQ("hello", response); diff --git a/echo2_server.json b/echo2_server.json index 511fdf217..70ac3504c 100644 --- a/echo2_server.json +++ b/echo2_server.json @@ -15,7 +15,9 @@ ] }], - "admin": { "access_log_path": "/dev/null", "profile_path": "{{ test_tmpdir }}/envoy.prof", "address": "tcp://127.0.0.1:0" }, + "admin": { "access_log_path": "/dev/null", + "profile_path": "{{ test_tmpdir }}/envoy.prof", + "address": "tcp://{{ ip_loopback_address }}:0" }, "cluster_manager": { "clusters": []