|
|
|
@ -1223,6 +1223,28 @@ def test_header_matching(gcp, original_backend_service, instance_group, |
|
|
|
|
"EmptyCall": original_backend_instances, |
|
|
|
|
"UnaryCall": alternate_backend_instances |
|
|
|
|
}), |
|
|
|
|
( |
|
|
|
|
[{ |
|
|
|
|
'priority': 0, |
|
|
|
|
# Header RegexMatch -> alternate_backend_service. |
|
|
|
|
# EmptyCall is sent with the metadata. |
|
|
|
|
'matchRules': [{ |
|
|
|
|
'prefixMatch': |
|
|
|
|
'/', |
|
|
|
|
'headerMatches': [{ |
|
|
|
|
'headerName': |
|
|
|
|
_TEST_METADATA_KEY, |
|
|
|
|
'regexMatch': |
|
|
|
|
"^%s.*%s$" % (_TEST_METADATA_VALUE_EMPTY[:2], |
|
|
|
|
_TEST_METADATA_VALUE_EMPTY[-2:]) |
|
|
|
|
}] |
|
|
|
|
}], |
|
|
|
|
'service': alternate_backend_service.url |
|
|
|
|
}], |
|
|
|
|
{ |
|
|
|
|
"EmptyCall": alternate_backend_instances, |
|
|
|
|
"UnaryCall": original_backend_instances |
|
|
|
|
}), |
|
|
|
|
] |
|
|
|
|
|
|
|
|
|
for (route_rules, expected_instances) in test_cases: |
|
|
|
|