startManualResolverWithConfig registers and returns a manual resolver which pushes the RLS LB policy's service config on the channel.
(t *testing.T, rlsConfig *e2e.RLSConfig)
| 190 | // startManualResolverWithConfig registers and returns a manual resolver which |
| 191 | // pushes the RLS LB policy's service config on the channel. |
| 192 | func startManualResolverWithConfig(t *testing.T, rlsConfig *e2e.RLSConfig) *manual.Resolver { |
| 193 | t.Helper() |
| 194 | |
| 195 | scJSON, err := rlsConfig.ServiceConfigJSON() |
| 196 | if err != nil { |
| 197 | t.Fatal(err) |
| 198 | } |
| 199 | |
| 200 | sc := internal.ParseServiceConfig.(func(string) *serviceconfig.ParseResult)(scJSON) |
| 201 | r := manual.NewBuilderWithScheme("rls-e2e") |
| 202 | r.InitialState(resolver.State{ServiceConfig: sc}) |
| 203 | t.Cleanup(r.Close) |
| 204 | return r |
| 205 | } |
| 206 | |
| 207 | // makeTestRPCAndExpectItToReachBackend is a test helper function which makes |
| 208 | // the EmptyCall RPC on the given ClientConn and verifies that it reaches a |
no test coverage detected