-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose Virtual Host in Route Entry #314
Conversation
@lyft/network-team |
VirtualHostImpl(const Json::Object& virtual_host, Runtime::Loader& runtime, | ||
Upstream::ClusterManager& cm); | ||
|
||
// Router::VirtualHost |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: interface implementation definitions go below the other random methods.
public: | ||
// Router::VirtualHost | ||
const std::string& name() const override { return name_; } | ||
std::string name_{"fake_vhost"}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: newline before this line
@@ -18,152 +18,66 @@ namespace Router { | |||
TEST(BadRateLimitConfiguration, MissingActions) { | |||
std::string json = R"EOF( | |||
{ | |||
"virtual_hosts": [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You still need some test that tests that the main config properly loads an embedded rate limit. Do you still have at least one test that loads a full config?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it is below. The tests are under the RateLimitConfiguration class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm after nits
* Basic integration test * Addressed comments
Automatic merge from submit-queue. [DO NOT MERGE] Auto PR to update dependencies of mixerclient This PR will be merged automatically once checks are successful. ```release-note none ```
Fixes envoyproxy#161. Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Keith Smiley <keithbsmiley@gmail.com> Signed-off-by: JP Simard <jp@jpsim.com>
Signed-off-by: Keith Smiley <keithbsmiley@gmail.com> Signed-off-by: JP Simard <jp@jpsim.com>
This expose the virtual host that owns the route entry. The virtual host is needed within http/filter/ratelimit.cc to be able to apply ratelimits at the virtual host layer. The next PR will expose RateLimitPolicy on VirtualHost.
This PR also enhances test coverage on RateLimitPolicyEntry and simplifies the test code within router_ratelimit_test.cc