Merge pull request #25170 from menghanl/path_matching_regex

xds testing: add regex path matching test
pull/25122/head
Menghan Li 4 years ago committed by GitHub
commit 4860738db7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 16
      tools/run_tests/run_xds_tests.py

@ -1025,7 +1025,21 @@ def test_path_matching(gcp, original_backend_service, instance_group,
{ {
"UnaryCall": original_backend_instances, "UnaryCall": original_backend_instances,
"EmptyCall": alternate_backend_instances "EmptyCall": alternate_backend_instances
}) }),
(
[{
'priority': 0,
# Regex UnaryCall -> alternate_backend_service.
'matchRules': [{
'regexMatch':
'^\/.*\/UnaryCall$' # Unary methods with any services.
}],
'service': alternate_backend_service.url
}],
{
"UnaryCall": alternate_backend_instances,
"EmptyCall": original_backend_instances
}),
] ]
for (route_rules, expected_instances) in test_cases: for (route_rules, expected_instances) in test_cases:

Loading…
Cancel
Save