Router check tool with two input json files#682
Router check tool with two input json files#682mattklein123 merged 20 commits intoenvoyproxy:masterfrom
Conversation
bazel/envoy_build_system.bzl
Outdated
There was a problem hiding this comment.
Can you order the parameter and the use of the parameter consistently relative to other params/args? I tend to use what buildifier says or https://bazel.build/versions/master/docs/be/c-cpp.html for guidance.
There was a problem hiding this comment.
Should this be "Route table check tool" rather than "Router check tool"? Same in various places below.
There was a problem hiding this comment.
As discussed, the expected/checked properties can be reorganized so that individual input entries can be more expressive.
There was a problem hiding this comment.
Can you just reorder this so that the inputs come first and the "check" block comes last? This would be a bit clearer to the reader.
source/common/router/config_impl.cc
Outdated
There was a problem hiding this comment.
Prefer headers.ForwardedProto() != nullptr for better readability (it's clear we're dealing with a pointer).
There was a problem hiding this comment.
I would simplify and get rid of the total Y/N. In the simple, automated case, just exit 0/1 depending on whether there is a match. If --details is specified, print the details. It would simplify the interface and the implementation as well. No need for the calls to increaseCounters in various places.
test/tools/router_check/router.h
Outdated
There was a problem hiding this comment.
You don't need Doxygen for internal methods like this, in particular when the comment is basically the same as the name.
test/tools/router_check/router.h
Outdated
test/tools/router_check/router.h
Outdated
There was a problem hiding this comment.
To match Envoy style you can use std::unique_ptr here. It will also automagically fix the (harmless) memory leak of Router::ConfigImpl.
test/tools/router_check/router.cc
Outdated
There was a problem hiding this comment.
I think this is harmless because the Router::ConfigImpl has a lifetime that ends when this executable exits, but there's a memory leak here. std::unique_ptr will address this without having to write a custom dtor.
There was a problem hiding this comment.
+1, please get into the habit of always writing leak free (and exception safe) code even in utilities like this. unique_ptr is the way to go.
htuch
left a comment
There was a problem hiding this comment.
This is coming together nicely, I like the thorough documentation and testing in the PR. I still have some design level feedback before getting into the implementation specifics.
bazel/envoy_build_system.bzl
Outdated
There was a problem hiding this comment.
I just added a shell test in #706, so based on this experience I'm thinking we can just skip the envoy_sh_test and use sh_test directly., we don't have too much Envoy specific that's going to be shared across tests today.
There was a problem hiding this comment.
Thanks for adding this simple example, I enjoy seeing concrete examples when reading docs :)
There was a problem hiding this comment.
"to be added as input to route determination."
There was a problem hiding this comment.
It's a little unclear to me how to use this. When would I specify a value of 4 vs. a value of 312? What does it do? Is it a seed? Is it a weight towards a particular cluster? etc.
test/tools/router_check/BUILD
Outdated
There was a problem hiding this comment.
So, naively I would have thought that the way to probe for SSL handling would by by setting the :scheme pseudo-header. However, looking at Envoy, it seems to only consider require_ssl by using x-forwarded-proto rather than :scheme in https://github.com/lyft/envoy/blob/master/source/common/router/config_impl.cc#L497.
I think this is because ConnectionManagerUtility::mutateRequestHeaders(), invoked on the request decode path, converts the :scheme into x-forwarded-proto.
So, I think we should actually make the ssl option here set :scheme: https, as if it's the simple case of a non-proxied request, and then have x-forwarded-proto available for testing via the additional_headers mechanism, no need to make it an explicit option.
@mattklein123 for confirmation.
There was a problem hiding this comment.
@hennna and I were just discussing this. I now understand why we need to use x-forwarded-proto vs. :scheme in the test - it's a result of the fact we're mocking out the rest of Envoy and don't have the :scheme conversion applied to the header prior to passing to the router.
There was a problem hiding this comment.
I'm not sure (as a reader) I get why thy there is different behavior for the redirect path case, or even how to specify whether in a test case I want to exercise redirect behavior. I think avoiding special cases is best (principle of least surprise). Same applies to the ssl value below.
There was a problem hiding this comment.
Yeah, so looking at how the tool works, I think we shouldn't change the actual input behavior based on whether the output is specified as path_redirect. We can talk about this in person a bit, but I think the cleaner design is to just specify redirect behavior as a combination of the input path/authority and route config table, then measure the behavior here via the above checked results, with no special case mutation of the headers.
There was a problem hiding this comment.
@htuch I've updated the tool so path_redirect does not have special config cases. Instead, method is set to GET by default and x-forwarded-proto is set to http by default in all test cases.
bbbd9ff to
3c02c3e
Compare
htuch
left a comment
There was a problem hiding this comment.
I think this is now great at the design level, so onto the implementation review. It's looking mostly good there too modulo the review comments.
|
|
||
| random_value | ||
| *(optional, integer)* An integer used to supply the random seed to use if a runtime choice is | ||
| required. Currently testing with valid runtime values is not supported. The default value of |
There was a problem hiding this comment.
I don't understand it fully which is why it isn't supported in the tool. My understanding is that routes can match on a runtime key in addition to matching header values. https://lyft.github.io/envoy/docs/configuration/http_conn_man/route_config/route.html#config-http-conn-man-route-table-route
In that case, this value is used to determine whether a runtime feature is enabled.
https://github.com/lyft/envoy/blob/master/source/common/router/config_impl.cc#L152
The confusion is that this value also seems to be used when choosing between weighted clusters.
https://github.com/lyft/envoy/blob/master/source/common/router/config_impl.cc#L288
| random_value is 0. | ||
|
|
||
| ssl | ||
| *(optional, boolean)* A flag that determines whether to set x-forwarded-proto to https or http. |
There was a problem hiding this comment.
As a second sentence: "By setting x-forwarded-proto to a given protocol, the tool is able to simulate the behavior of a client issuing a request via http or https." It's still a bit low-level in explanation, the user really just cares about whether it's an http or https request, not how it works internally.
docs/install/tools.rst
Outdated
| The program exits with status EXIT_FAILURE if any test case does not match the expected route parameter | ||
| value. | ||
|
|
||
| The - -details option prints out details for each test case. The first field indicates |
docs/install/tools.rst
Outdated
| P -----locations ----- locations | ||
| F -----www2 ----- www3 | ||
| P -----root_www2 ----- root_www2 | ||
| P -----https://redirect.lyft.com/new_bar ----- https://redirect.lyft.com/new_bar |
There was a problem hiding this comment.
It's probably cleaner to use whitespace separation rather than -----, since this makes it easier to parse out in other tools that might consume this tool, e.g. running sed/cut/grep over the output of --details.
docs/install/tools.rst
Outdated
| P -----root_www2 ----- root_www2 | ||
| P -----https://redirect.lyft.com/new_bar ----- https://redirect.lyft.com/new_bar | ||
|
|
||
| Testing with valid runtime values is not currently supported but can be added. |
There was a problem hiding this comment.
This is another place that valid runtime values comes up that the reader might not have context for.
|
|
||
| /** | ||
| * Compare the expected and acutal route parameter values. Print out | ||
| * match details is details_ flag is set |
| * match details is details_ flag is set | ||
| * @param actual holds the acutal route returned by the router | ||
| * @param expected holds the expected parameter value of the route | ||
| * @return true if acutal and expected match |
| */ | ||
| bool compareEntriesInJson(const std::string& expected_route_json); | ||
|
|
||
| // Set whether to print out match case details |
There was a problem hiding this comment.
Nit: This one is not Doxygen but the others are. They should ideally be consistent.
| } | ||
|
|
||
| bool RouterCheckTool::compareCluster(ToolConfig& tool_config, const std::string expected) { | ||
| Router::RouteConstSharedPtr route = |
There was a problem hiding this comment.
I think the route determination should be done once in routerCheckTool::compareEntriesInJson, rather multiple times in each of the compare* methods. You can pass a reference to the returned route, so this is just a small refactoring.
docs/install/tools.rst
Outdated
|
|
||
| The - -details option prints out details for each test case. The first field indicates | ||
| a P for a correct match and a F for a failed match. The second field is the actual route parameter value. | ||
| The third field is the expected route parameter value. For example: :: |
There was a problem hiding this comment.
I think there should be a fourth field indicating what is actually being compared, e.g. is it the virtual cluster, the redirect_path, etc.
htuch
left a comment
There was a problem hiding this comment.
This is looking great, ready for wider review. @mattklein123 would you like to take a pass?
docs/install/tools.rst
Outdated
| P locations locations cluster_name | ||
|
|
||
| Testing with valid runtime values is not currently supported but can be added. | ||
| Testing with valid :ref:`runtime values <config_http_conn_man_route_table_route>` is not currently supported but can be added. |
There was a problem hiding this comment.
s/but can be added/, this may be added in future work./
| @@ -12,6 +12,23 @@ envoy_cc_test_library( | |||
| name = "router_check_main_lib", | |||
There was a problem hiding this comment.
You could optionally combined roucher_check_main_lib and router_tool_lib.
|
|
||
| const std::string Json::ToolSchema::ROUTER_CHECK_SCHEMA(R"EOF( | ||
| const std::string& Json::ToolSchema::routerCheckSchema() { | ||
| static const std::string* router_check_schema = new std::string(R"EOF( |
There was a problem hiding this comment.
Great, this is what I was talking about it.
test/tools/router_check/router.h
Outdated
| /** | ||
| * Compare the expected and acutal route parameter values. Print out | ||
| * match details is details_ flag is set | ||
| * match details if details_ flag is set |
There was a problem hiding this comment.
Nit: the earlier line seems too shrot.
| are GET, PUT, or POST. | ||
|
|
||
| random_value | ||
| *(optional, integer)* An integer used to supply the random seed to use if a runtime choice is |
There was a problem hiding this comment.
Based on https://github.com/lyft/envoy/blob/master/source/common/router/config_impl.cc#L288, I think a better description would be: An integer used to supply the random seed for weighted cluster selection.. No need to mention runtime choice I think.
There was a problem hiding this comment.
nit: @htuch I suggest keeping the name as is, as it serves two purposes (weighted_clusters and a previous incarnation of the same where the route blocks were repeated, with different target clusters and runtime values). @mattklein123 and @ccaraman - do you folks still use the old runtime style way of shifting traffic?
And btw, random_value is not even the seed. It "is" the random number that Envoy runtime uses (this number modulo 100 to obtain the weight for the route and then identify the target cluster)
test/tools/router_check/router.h
Outdated
|
|
||
| bool details_{false}; | ||
|
|
||
| // TODO(hennna): Switch away from mocks depending on feedback |
There was a problem hiding this comment.
I think it's fine for v1, but would be interested in hearing about what other reviewers think. The idea is we could avoid taking a gmock dependency (and requiring this to be treated as a test binary by Bazel) by using dummy objects that are explicitly written instead of mocks. It might be the case that we could reuse what @rlazarus is doing for the config validation work, so could punt until then.
There was a problem hiding this comment.
Can you clarify a bit more? as a test binary for what purpose? To test Envoy during compilation process ?
test/tools/router_check/router.cc
Outdated
| // Call appropriate function for each match case | ||
| if (check_type->hasObject("path_redirect")) { | ||
| if (!compareRedirectPath(tool_config, check_type->getString("path_redirect"), route)) { | ||
| no_failures = false; |
There was a problem hiding this comment.
There's ways to make this a bit more concise, e.g. by using a map of check_type -> check function. E.g. you could consider:
const std::unorder_map<std::string, std::function<bool(ToolConfig&,const std::string&,Router::RouteConstSharedPtr)> checkers = {
{"path_redirect", std::bind(&RouterCheckTool::compareRedirect, this)},
{"cluster_name", std::bind(&RouterCheckTool::compareCluster, this)},
etc..
}
and then iterating over this map and applying the functions.
This is kind of an advanced C++ thing, I think for a tool like this you could do what you have today, just offering an alternative.
There was a problem hiding this comment.
This is good advice :) @htuch beat me to it. Instead of the long sequence of ifs you can write something like:
for (auto kv : function_map) {
if (check_type->hasObject(kv.first)) {
auto test_result = kv.second(tool_config, check_type->getString(kv.first), route); // assuming you don't want to early exit
no_failures = no_failures ? test_result : false;
}
}Or iterate over found objects in JSON and look up the function in the map in a similar fashion.
| **NOTE: The following configuration is for the router table check tool only and is not part of the Envoy binary. | ||
| The route table check tool is used for testing purposes only.** | ||
|
|
||
| Input for the route table check tool. The route table check tool checks if the route returned |
There was a problem hiding this comment.
Do you intend for Input for the route table check tool to be a header? Otherwise it doesn't make too much sense the way the sentence is structured.
There was a problem hiding this comment.
No. I can expand to a full sentence.
| The route table check tool is used for testing purposes only.** | ||
|
|
||
| Input for the route table check tool. The route table check tool checks if the route returned | ||
| by a router matches what is expected. The tool can be used to check cluster name, virtual cluster name, |
There was a problem hiding this comment.
nit for router: add a link to the configuration.
| **NOTE: The following configuration is for the router table check tool only and is not part of the Envoy binary. | ||
| The route table check tool is used for testing purposes only.** | ||
|
|
||
| Input for the route table check tool. The route table check tool checks if the route returned |
There was a problem hiding this comment.
Please split this paragraph into a few sections:
- what the tool is meant to do, what is supported, etc
- how to configure the tool (example what are the required inputs, min fields, etc)
- sample input/ouput
There was a problem hiding this comment.
I can add a link to the install rst page and rephrase.
|
|
||
| [ | ||
| { | ||
| "authority":"api.lyft.com", |
There was a problem hiding this comment.
Please use proper header names, ex authority ->:authority
docs/install/tools.rst
Outdated
| @@ -0,0 +1,58 @@ | |||
| .. _install_tools: | |||
|
|
|||
| Router Table Check Tool | |||
There was a problem hiding this comment.
Please be consistent with the tooling name. I prefer Route over Router.
docs/install/tools.rst
Outdated
| value. | ||
|
|
||
| The ``--details`` option prints out details for each test case. The first field indicates | ||
| a P for a correct match and a F for a failed match. The second field is the expected route parameter value. |
There was a problem hiding this comment.
About the second field, it isn't clear to me what the route parameter value means? One way to link to which test case fails is to have a name for each testing object.
There was a problem hiding this comment.
Or if the fourth field were the second field.
| .. code-block:: json | ||
|
|
||
| [ | ||
| { |
There was a problem hiding this comment.
suggestion: I would break the object into three parts
- name for the test case
- input value
- expected output value
The reason for a tests name is once there are many objects it will be difficult to identify which individual test case failed. Grouping all of the input into an object makes it cleaner to understand what is being passed in.
There was a problem hiding this comment.
I can add this change. In that case would --details print out 4 fields or 5?
P/F test_name test_case expected actual OR
P/F test_name expected actual
There was a problem hiding this comment.
I was doing a bit of thinking about this, and maybe the print output could be changed to something that looks like
Test Case: <test case name>
P/F <test_case> <expected> <actual>
...
The one thing that I'm still not sure about is if we should print the test cases that passed.
There was a problem hiding this comment.
In the most recent commit I've decided not to output details for the pass cases. The resulting print out would be:
<test case name>
<expected> <actual> <test_case>
...
where <expected> <actual> <test_case> are only printed for failure cases.
| "random_value" : "...", | ||
| "ssl" : "...", | ||
| "internal" : "...", | ||
| "check": { |
There was a problem hiding this comment.
nit: maybe change check to expected_output?
There was a problem hiding this comment.
or validate perhaps? I would also prefix the field with __ to indicate that its special.
test/tools/router_check/router.h
Outdated
| #include "test/tools/router_check/json/tool_config_schemas.h" | ||
|
|
||
| /** | ||
| * Class that store the configuration parameters of the router |
test/tools/router_check/router.h
Outdated
|
|
||
| /** | ||
| * Class that store the configuration parameters of the router | ||
| * check tool extracted from a json input file |
There was a problem hiding this comment.
nit: full stop at the end of the sentence.
| "type": "object", | ||
| "properties": { | ||
| ":authority": {"type": "string", "required": true}, | ||
| ":path": {"type": "string"}, |
There was a problem hiding this comment.
Can you add a min length check?
|
|
||
|
|
||
| additional_headers | ||
| *(optional, array)* Additional headers to be added as input for route determination. The ":authority", |
There was a problem hiding this comment.
can you please expand what the content of the array are? Similar to adding a section for https://lyft.github.io/envoy/docs/configuration/http_conn_man/route_config/route.html#adding-custom-request-headers
Please do this for the expected output for headers
| }, | ||
| "additionalProperties": false, | ||
| "required": ["field", "value"], | ||
| "maxProperties": 2 |
There was a problem hiding this comment.
What does max Properties do?
There was a problem hiding this comment.
I put this here because the json schema allows properties to be repeated. For example:
{
"field": ":authority",
"value": "http://google.com",
"field": ":path"
}``
is acceptable. By saying both fields are required and that only two properties are allowed, I am trying to deter json input files with erroneous schemas.
| * Obtain the router check json schema | ||
| * @return const std::string& of the schema string | ||
| */ | ||
| static const std::string& routerCheckSchema(); |
There was a problem hiding this comment.
Can you create a static const var like https://github.com/lyft/envoy/blob/master/source/common/json/config_schemas.h#L8?
There was a problem hiding this comment.
Originally I followed the definition pattern in config_shemas.h, but I changed to wrapping the variable in a function in this commit: 34d1dcb.
The reasoning was in response to comments pointing out that static const string types are dangerous due to random ordering of constructor and destructor calls.
test/tools/router_check/router.cc
Outdated
| Json::ObjectPtr loader = Json::Factory::LoadFromFile(config_json); | ||
| loader->validateSchema(schema); | ||
| return loader; | ||
|
|
test/tools/router_check/router.h
Outdated
| /** | ||
| * @param router_config_json specifies the router config json file | ||
| * @return bool if json file loaded successfully and ConfigImpl object created | ||
| * successfully |
There was a problem hiding this comment.
nit: spacing. Can you aline successfully under bool? like https://github.com/lyft/envoy/blob/master/include/envoy/http/async_client.h#L133-L135
| # Testing expected matches | ||
| for t in "${TESTS[@]}" | ||
| do | ||
| TEST_OUTPUT=$("${PATH_BIN}" "${PATH_CONFIG}/${t}.json" "${PATH_CONFIG}/${t}.golden.json" "--details") |
There was a problem hiding this comment.
Does the "golden" prefix for a file mean the test case?
There was a problem hiding this comment.
Yes, that's correct.
| } | ||
|
|
||
| bool RouterCheckTool::initializeFromConfig(const std::string& router_config_json) { | ||
|
|
There was a problem hiding this comment.
Please add a TODO to load a full config and extract the route configuration from it. I think that will be useful in the future so users can just pass in their existing config.
|
|
||
| bool RouterCheckTool::compareCluster(ToolConfig& tool_config, const std::string& expected) { | ||
| std::string actual = ""; | ||
| if (tool_config.route_->routeEntry() != nullptr) { |
There was a problem hiding this comment.
nit: keep new line spacing consistent across Compare Methods. either had a new line here or remove the new lines in the other compare methods
test/tools/router_check/router.h
Outdated
| * @param config_json specifies the json config file to be loaded | ||
| * @param schema is the json schema to validate against | ||
| * @return Json::ObjectPtr pointer to router config json object. Return | ||
| * nullptr if load fails. |
| "additional_headers": [ | ||
| { | ||
| "field": "some_header", | ||
| "value": "some_cluster" |
|
|
||
| # Failure test case | ||
| FAILURE_OUTPUT=$("${PATH_BIN}" "${PATH_CONFIG}/TestRoutes.json" "${PATH_CONFIG}/Weighted.golden.json" "--details") || | ||
| if [[ "${FAILURE_OUTPUT}" == *"cluster1 instant-server cluster_name"* ]]; then |
There was a problem hiding this comment.
why is there a reference to a test case output for cluster1?
There was a problem hiding this comment.
This shell script exercises the route table test tool -- a test for the test tool. In this test, I mixed and matched the TestRoutes router config with the Weighted test tool config. In that case there will be failure test cases. Rather than matching on all the failure test cases, I am checking that a specific cluster_name match test case failed. The failed test case has cluster1 as the expected cluster name and instant-server as the actual cluster name returned by the router.
|
@hennna I will take a look through in a few hours. |
| ":authority":"api.lyft.com", | ||
| ":path": "/api/locations" | ||
| } | ||
| "_validate" |
There was a problem hiding this comment.
out of curiosity why does validate start with a _ ?
There was a problem hiding this comment.
To show that it is a special parameter. This was in response to an earlier comment.
There was a problem hiding this comment.
Now I realize that the comment recommended __ (two underscores). Is there a preference for two, one, or no prefix?
There was a problem hiding this comment.
I don't know the original comment. To me it seems odd to have any underscore, but I don't care that much. I would poll some folks sitting by you.
source/common/router/config_impl.cc
Outdated
| uint64_t random_value) const { | ||
| // First check for ssl redirect. | ||
| if (ssl_requirements_ == SslRequirements::ALL && headers.ForwardedProto()->value() != "https") { | ||
| if (ssl_requirements_ == SslRequirements::ALL && headers.ForwardedProto() != nullptr && |
There was a problem hiding this comment.
I don't mind the changes in this file, but FYI the connection manager enforces that ForwardedProto is always set. Not sure if we should change this or your tool should mimic that behavior and always set ForwardedProto to something by default?
mattklein123
left a comment
There was a problem hiding this comment.
@hennna thanks a lot, this is awesome. Just some high level style comments. I know this is "just a test tool" but it's a good learning experience for writing good prod side code also. Just a few fixes and I think we are good to merge.
| namespace Json { | ||
|
|
||
| class ToolSchema { | ||
|
|
test/tools/router_check/router.cc
Outdated
| const std::string& schema) { | ||
|
|
||
| try { | ||
| // Json configuration |
There was a problem hiding this comment.
general coding style preference: There are a lot of comments in this change that are obvious. For example if you have something like this:
// do something cool
doSomethingCool();
There is no point in having a comment. Can you go through and delete comments that fall into that category (there are many).
| @@ -0,0 +1,29 @@ | |||
| #include "test/precompiled/precompiled_test.h" | |||
There was a problem hiding this comment.
this should be included for you, delete
| #include "test/tools/router_check/router.h" | ||
|
|
||
| int main(int argc, char* argv[]) { | ||
|
|
test/tools/router_check/router.cc
Outdated
| } | ||
|
|
||
| bool RouterCheckTool::compareEntriesInJson(const std::string& expected_route_json) { | ||
| if (config_ == nullptr) { |
There was a problem hiding this comment.
Can this happen? Please delete error handling that can't happen.
test/tools/router_check/router.cc
Outdated
| Json::ObjectPtr loader = Json::Factory::LoadFromFile(config_json); | ||
| loader->validateSchema(schema); | ||
| return loader; | ||
| } catch (const EnvoyException& ex) { |
There was a problem hiding this comment.
You have quite a bit of extra error handling after you catch this exception. Embrace exceptions, they are awesome. In this case, I would have a top level try/catch in main(), and catch EnvoyException, print an error, and exit(1). If you do this, you can get rid of quite a bit of extraneous error handling in the code.
test/tools/router_check/router.cc
Outdated
| // configuration from it. | ||
| Json::ObjectPtr loader = loadJson(router_config_json, Json::Schema::ROUTE_CONFIGURATION_SCHEMA); | ||
|
|
||
| if (loader != nullptr) { |
There was a problem hiding this comment.
this is an example of error checking you can get rid of if you allow exceptions to bubble up. There is more.
test/tools/router_check/router.cc
Outdated
| for (const Json::ObjectPtr& check_config : loader->asObjectArray()) { | ||
| // Load parameters from json | ||
| ToolConfig tool_config; | ||
| tool_config.parseFromJson(check_config); |
There was a problem hiding this comment.
Just make constructor take check_config and throw exception if there is an issue. No need for other function.
There was a problem hiding this comment.
It seems folks around here aren't comfortable with exceptions being thrown in constructors. I've updated the code to follow the model in https://github.com/lyft/envoy/blob/master/source/common/network/cidr_range.h#L95 using static factory methods to create instances of ToolConfig and RouterCheckTool.
There was a problem hiding this comment.
It's not worth arguing over this case, but throwing exceptions from constructors is how errors are raised from constructors. In an RAII world, cleanup, etc. happen properly. If you want to have a static creation function feel free but it's not required.
test/tools/router_check/router.h
Outdated
|
|
||
| bool details_{false}; | ||
|
|
||
| // TODO(hennna): Switch away from mocks depending on whether envoy testing |
There was a problem hiding this comment.
I would remove this TODO. Not sure why we would switch away from mocks? Or do you mean the work that @rlazarus is doing?
test/tools/router_check/router.h
Outdated
|
|
||
| #include "test/mocks/runtime/mocks.h" | ||
| #include "test/mocks/upstream/mocks.h" | ||
| #include "test/precompiled/precompiled_test.h" |
There was a problem hiding this comment.
del (might be other instances)
Description: this job keeps timing out #634 for long term solution Risk Level: low Signed-off-by: Jose Nino <jnino@lyft.com> Signed-off-by: JP Simard <jp@jpsim.com>
Description: this job keeps timing out #634 for long term solution Risk Level: low Signed-off-by: Jose Nino <jnino@lyft.com> Signed-off-by: JP Simard <jp@jpsim.com>
The router check tool compares whether routes returned by a router match what is expected. The tool takes two configuration json files: a router config file and a tool config file. This PR is in response to Issue #538.
The router tool is built using bazel. The tool is located in a new directory: test/tools/router_check/.
test/tools/router_check/json holds the tool config json schema files
route_test.sh exercises the tool to test 8 pairs of input router/tool config json files. The config files are located in test/tools/router_check/test/config/...