Merge pull request #25262 from menghanl/testing_desc

xds testing: add test cases for header/path matching to test desc
pull/25298/head
Menghan Li 4 years ago committed by GitHub
commit b1065bc21d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 74
      doc/xds-test-descriptions.md

@ -375,25 +375,27 @@ Assert:
1. UnaryCall RPCs are sent to MIG_default
1. EmptyCall RPCs are sent to MIG_default
The test driver adds a route for EmptyCall, routes become:
The test driver changes route and asserts RPCs are sent to expected backends. **Note** that the default route `"/"` is always pointing to MIG_default, so all RPCs not matching the new route will be sent to MIG_default.
1. path{“/grpc.testing.TestService/EmptyCall”}: MIG_2
1. “/”: MIG_default
- {path: `/grpc.testing.TestService/EmptyCall`}: MIG_2
- UnaryCall -> MIG_default
- EmptyCall -> MIG_2
Assert:
1. UnaryCall RPCs are sent to MIG_default
1. EmptyCall RPCs are sent to MIG_2
- {prefix: `/grpc.testing.TestService/Unary`}: MIG_2
- UnaryCall -> MIG_2
- EmptyCall -> MIG_default
The test driver adds a route for prefix Unary, routes become:
- {prefix: `/grpc.testing.TestService/Unary`}: MIG_default & {path: `/grpc.testing.TestService/EmptyCall`}: MIG_2
- UnaryCall -> MIG_default
- EmptyCall -> MIG_2
1. prefix{“/grpc.testing.TestService/Unary”}: MIG_2
1. “/”: MIG_default
- {regex: `^\/.*\/UnaryCall$`}: MIG_2
- UnaryCall -> MIG_2
- EmptyCall -> MIG_default
Assert:
1. UnaryCall RPCs are sent to MIG_2
1. EmptyCall RPCs are sent to MIG_default
- {path: `/gRpC.tEsTinG.tEstseRvice/empTycaLl`, ignoreCase: `True`}: MIG_2
- UnaryCall -> MIG_default
- EmptyCall -> MIG_2
### header_matching
@ -419,15 +421,41 @@ Assert:
1. UnaryCall RPCs are sent to MIG_default
1. EmptyCall RPCs are sent to MIG_default
The test driver adds a route for header exact match, routes become:
1. header{“xds_md”, exact: “exact_match”}: MIG_2
1. “/”: MIG_default
Assert:
1. UnaryCall RPCs are sent to MIG_default
1. EmptyCall RPCs are sent to MIG_2
The test driver changes route and asserts RPCs are sent to expected backends. **Note** that the default route `"/"` is always pointing to MIG_default, so all RPCs not matching the new route will be sent to MIG_default.
- {header `xds_md`, exact: `empty_ytpme`}: MIG_2
- Unary -> MIG_default
- Empty -> MIG_2
- {header `xds_md`, prefix: `un`}: MIG_2
- `un` is the prefix of metadata sent with UnaryCall
- Unary -> MIG_2
- Empty -> MIG_default
- {header `xds_md`, suffix: `me`}: MIG_2
- `me` is the suffix of metadata sent with EmptyCall
- Unary -> MIG_default
- Empty to MIG_2
- {header `xds_md_numeric`, present: `True`}: MIG_2
- Unary is sent with the metadata, so will be sent to alternative
- Unary -> MIG_2
- Empty -> MIG_default
- {header `xds_md`, exact: `unary_yranu`, invert: `True`}: MIG_2
- Unary is sent with the metadata, so this will not match Unary, but will match Empty
- Unary -> MIG_default
- Empty to MIG_2
- {header `xds_md_numeric`, range `[100,200]`}: MIG_2
- Unary is sent with the metadata in range
- Unary -> MIG_2
- Empty -> MIG_default
- {header `xds_md`, regex: `^em.*me$`}: MIG_2
- EmptyCall is sent with the metadata
- Unary -> MIG_default
- Empty -> MIG_2
### gentle_failover

Loading…
Cancel
Save