Skip to content
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

router_check_tool: fix ASSERT in path_rewrite test #7106

Merged
merged 2 commits into from
May 31, 2019

Conversation

jyotima
Copy link
Contributor

@jyotima jyotima commented May 30, 2019

Signed-off-by: Jyoti Mahapatra jmahapatra@lyft.com

Description: When multiple test validations are mentioned in the validation section,
eg:

"validate": {
        "host_rewrite": "api.lyft.com",
        "virtual_host_name": "api",
        "path_rewrite": "/pre/test",
        "cluster_name": "www2"
      }

finalizeRequestHeaders is called multiple times causing ASSERT failures. None of the existing tests covered this scenario. Now few tests have been added to simulate the error.

Before the fix the failure looked like this

[2019-05-29 19:47:48.210][1405009][critical][assert] [source/common/router/config_impl.cc:557] assert failure: case_sensitive_ ? absl::StartsWith(path, matched_path) : absl::StartsWithIgnoreCase(path, matched_path).

Risk Level: Low
Testing:

  • Added breaking tests and fixed them using the fix.
  • Tested the tool against lyft's routes

fix
Signed-off-by: Jyoti Mahapatra <jmahapatra@lyft.com>
@jyotima jyotima changed the title router_check_tool fix ASSERT in path_rewrite router_check_tool fix ASSERT in path_rewrite test May 30, 2019
@jyotima jyotima changed the title router_check_tool fix ASSERT in path_rewrite test router_check_tool: fix ASSERT in path_rewrite test May 30, 2019
Copy link
Contributor

@jmarantz jmarantz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a test that should be added that would fail without your new production code? Or is that implicit in the new json & yaml you added?
[edit]
never mind you covered this in the description. Thanks. LGTM modulo nit.

test/tools/router_check/router.cc Outdated Show resolved Hide resolved
@jmarantz jmarantz self-assigned this May 30, 2019
Signed-off-by: Jyoti Mahapatra <jmahapatra@lyft.com>
@lizan lizan merged commit c22655c into envoyproxy:master May 31, 2019
@jyotimahapatra
Copy link
Contributor

#730

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants