test: refactoring how we add custom routes#6382
Merged
alyssawilk merged 2 commits intoenvoyproxy:masterfrom Mar 27, 2019
Merged
test: refactoring how we add custom routes#6382alyssawilk merged 2 commits intoenvoyproxy:masterfrom
alyssawilk merged 2 commits intoenvoyproxy:masterfrom
Conversation
Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
snowp
suggested changes
Mar 26, 2019
Contributor
snowp
left a comment
There was a problem hiding this comment.
Great, this looks like a way better way of managing all the different options
test/config/utility.h
Outdated
| bool include_attempt_count_header = false, const absl::string_view upgrade = "", | ||
| const envoy::api::v2::route::RouteAction::InternalRedirectAction internal_action = | ||
| envoy::api::v2::route::RouteAction::PASS_THROUGH_INTERNAL_REDIRECT); | ||
| envoy::api::v2::route::VirtualHost createHost(const char* host, const char* route = "/", |
Contributor
There was a problem hiding this comment.
nit: maybe call this createVHost or createVirtualHost?
test/config/utility.h
Outdated
| envoy::api::v2::route::VirtualHost createHost(const char* host, const char* route = "/", | ||
| const char* cluster = "cluster_0"); | ||
|
|
||
| void addVirtualHost(envoy::api::v2::route::VirtualHost& vhost); |
Contributor
There was a problem hiding this comment.
any reason we're not passing this by const ref?
Contributor
Author
There was a problem hiding this comment.
Oh, I'd waffled about using Swap instead of CopyFrom and then forgot so got worst of both :-P
Good catch!
Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
snowp
approved these changes
Mar 27, 2019
Contributor
snowp
left a comment
There was a problem hiding this comment.
Great, this looks like a way better way of managing all the different options
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixing up a TODO - fitting all route config options simply doesn't scale, so refactoring things so we don't have functions with infinite arguments.
Risk Level: n/a (test only)
Testing: integration test pass
Docs Changes: n/a
Release Notes: n/a