mirror of https://github.com/grpc/grpc-java.git
xds: enable v3 API in bootstrap generated by cloud-to-prod resolver (#7995)
This commit is contained in:
parent
ab216a1720
commit
ccd43b64e3
|
|
@ -187,6 +187,7 @@ final class GoogleCloudToProdNameResolver extends NameResolver {
|
|||
serverBuilder.put("server_uri", server_uri);
|
||||
serverBuilder.put("channel_creds",
|
||||
ImmutableList.of(ImmutableMap.of("type", "google_default")));
|
||||
serverBuilder.put("server_features", ImmutableList.of("xds_v3"));
|
||||
return ImmutableMap.of(
|
||||
"node", nodeBuilder.build(),
|
||||
"xds_servers", ImmutableList.of(serverBuilder.build()));
|
||||
|
|
|
|||
|
|
@ -183,7 +183,8 @@ public class GoogleCloudToProdNameResolverTest {
|
|||
(List<Map<String, ?>>) bootstrap.get("xds_servers"));
|
||||
assertThat(server).containsExactly(
|
||||
"server_uri", "directpath-trafficdirector.googleapis.com",
|
||||
"channel_creds", ImmutableList.of(ImmutableMap.of("type", "google_default")));
|
||||
"channel_creds", ImmutableList.of(ImmutableMap.of("type", "google_default")),
|
||||
"server_features", ImmutableList.of("xds_v3"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
|||
Loading…
Reference in New Issue