test: integration test and admin integration test parameterization#1036
Conversation
|
I just merged envoyproxy/envoy-filter-example#4, can you update this PR with the new |
htuch
left a comment
There was a problem hiding this comment.
Looks good, mostly questions about ways to reduce the churn..
| fake_upstream_connection = fake_upstreams_[0]->waitForHttpConnection(*dispatcher_); | ||
| }, | ||
| [&]() -> void { request = fake_upstream_connection->waitForNewStream(); }, | ||
| [&]() -> void { request->waitForEndStream(*dispatcher_); }, |
There was a problem hiding this comment.
How come so much churn in formatting? It's a bit harder to pick out the diff here.
| codec_client = makeHttpConnection(lookupPort("http"), Http::CodecClient::Type::HTTP1, version); | ||
| }, | ||
| [&]() -> void { | ||
| codec_client->startRequest(Http::TestHeaderMapImpl{{":method", "GET"}, |
There was a problem hiding this comment.
Formatting here looks weird, the first block is done one way, the next another...
| const std::string& host = "host"); | ||
| makeSingleRequest(uint32_t port, const std::string& method, const std::string& url, | ||
| const std::string& body, Http::CodecClient::Type type, | ||
| Network::Address::IpVersion version = Network::Address::IpVersion::v4, |
There was a problem hiding this comment.
How come this is a parameter of the method? Can't makeSingleRequest call GetIpVersion() (nee GetParam()) to figure it out? Might simplify the call site churn.
There was a problem hiding this comment.
I'm not sure. This function is in test/integration/utility.cc
| TEST_P(IntegrationAdminTest, Admin) { | ||
| BufferingStreamDecoderPtr response = IntegrationUtil::makeSingleRequest( | ||
| lookupPort("admin"), "GET", "/", "", Http::CodecClient::Type::HTTP1); | ||
| lookupPort("admin"), "GET", "/", "", Http::CodecClient::Type::HTTP1, GetParam()); |
There was a problem hiding this comment.
Can we add a wrapper method for GetParam() that provides semantic information about what the parameter is? E.g. GetIpVersion()?
|
Could add a wrapper in InregeationBase to pass in the test state.
…On Thu, Jun 1, 2017 at 6:39 PM hennna ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In test/integration/utility.h
<#1036 (comment)>:
> * @param host supplies the host header to use for the request.
* @return BufferingStreamDecoderPtr the complete request or a partial request if there was
* remote easly disconnection.
*/
static BufferingStreamDecoderPtr
- makeSingleRequest(const Network::Address::IpVersion version, uint32_t port,
- const std::string& method, const std::string& url, const std::string& body,
- Http::CodecClient::Type type, const std::string& host = "host");
- // TODO(henna): Deprecate when IPv6 test support is finished.
- static BufferingStreamDecoderPtr makeSingleRequest(uint32_t port, const std::string& method,
- const std::string& url,
- const std::string& body,
- Http::CodecClient::Type type,
- const std::string& host = "host");
+ makeSingleRequest(uint32_t port, const std::string& method, const std::string& url,
+ const std::string& body, Http::CodecClient::Type type,
+ Network::Address::IpVersion version = Network::Address::IpVersion::v4,
I'm not sure. This function is in test/integration/utility.cc
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1036 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AKaLv3z-heiZ5Sjeul3pxY24mp2HH5Vbks5r_z2UgaJpZM4Nsa1b>
.
|
Updates echo2 integration test to match onging changes in envoyproxy/envoy#1036 .
htuch
left a comment
There was a problem hiding this comment.
Can you update the CI hash for the example and get the tests passing? Thanks.
|
@junr03 @RomanDzhabarov @ccaraman Can one of you take a look at this review? |
Description: Fixes incorrect signatures for the JNI calls on the trailers callback path in Android. Risk Level: Low Testing: Needs to be covered by AssertionFilter integration tests Signed-off-by: Mike Schore <mike.schore@gmail.com> Signed-off-by: JP Simard <jp@jpsim.com>
Description: Fixes incorrect signatures for the JNI calls on the trailers callback path in Android. Risk Level: Low Testing: Needs to be covered by AssertionFilter integration tests Signed-off-by: Mike Schore <mike.schore@gmail.com> Signed-off-by: JP Simard <jp@jpsim.com>
This PR parameterizes two integration tests: integration_test.cc and integration_admin_test.cc. The majority of the line changes are plumbing through the parameter
versionto allow code that originally hard coded an IPv4 address to now be parameterized.This is the second step in parameterizing IPv4 and IPv6 testing in the integration tests. The first step was parameterizing the echo_integration_test in #953 . In this PR, we update many of the functions in integration.cc that are called in integration_test.cc to take the parameter
version. Because other integration tests currently also rely on these functions, we set the default value to be Network::Address::IpVersion::v4. In a subsequent PR, we will also parameterize the other integration tests and the default value will be removed.The constructor for RawConnectionDriver and function makeSingleRequest in test/integration/utility.h were also updated to set the default version value to v4. This required reordering the function parameters.
createTestServer and temporaryFileSubstitute were also updated in a similar fashion.
asan and tsan tests passing requires https://github.com/lyft/envoy-filter-example/pull/4/files due to dependence on changes made in this PR.
Supports ongoing work in #351