@ -33,6 +33,8 @@ namespace {
using ClientStats = LrsServiceImpl : : ClientStats ;
using : : grpc_core : : testing : : ScopedExperimentalEnvVar ;
//
// XdsClientTest - basic tests of XdsClient functionality
//
@ -687,6 +689,7 @@ INSTANTIATE_TEST_SUITE_P(
// Bootstrap config default client listener template uses new-style name with
// authority "xds.example.com".
TEST_P ( XdsFederationTest , FederationTargetNoAuthorityWithResourceTemplate ) {
ScopedExperimentalEnvVar env_var ( " GRPC_EXPERIMENTAL_XDS_FEDERATION " ) ;
const char * kAuthority = " xds.example.com " ;
const char * kNewListenerTemplate =
" xdstp://xds.example.com/envoy.config.listener.v3.Listener/ "
@ -743,6 +746,7 @@ TEST_P(XdsFederationTest, FederationTargetNoAuthorityWithResourceTemplate) {
// In bootstrap config, authority has no client listener template, so we use the
// default.
TEST_P ( XdsFederationTest , FederationTargetAuthorityDefaultResourceTemplate ) {
ScopedExperimentalEnvVar env_var ( " GRPC_EXPERIMENTAL_XDS_FEDERATION " ) ;
const char * kAuthority = " xds.example.com " ;
const char * kNewServerName = " whee%/server.example.com " ;
const char * kNewListenerName =
@ -809,6 +813,7 @@ TEST_P(XdsFederationTest, FederationTargetAuthorityDefaultResourceTemplate) {
// Channel is created with URI "xds://xds.example.com/server.example.com".
// Bootstrap entry for that authority specifies a client listener name template.
TEST_P ( XdsFederationTest , FederationTargetAuthorityWithResourceTemplate ) {
ScopedExperimentalEnvVar env_var ( " GRPC_EXPERIMENTAL_XDS_FEDERATION " ) ;
const char * kAuthority = " xds.example.com " ;
const char * kNewServerName = " whee%/server.example.com " ;
const char * kNewListenerTemplate =
@ -877,6 +882,7 @@ TEST_P(XdsFederationTest, FederationTargetAuthorityWithResourceTemplate) {
}
TEST_P ( XdsFederationTest , TargetUriAuthorityUnknown ) {
ScopedExperimentalEnvVar env_var ( " GRPC_EXPERIMENTAL_XDS_FEDERATION " ) ;
const char * kAuthority = " xds.example.com " ;
const char * kNewServerName = " whee%/server.example.com " ;
const char * kNewListenerTemplate =
@ -902,6 +908,7 @@ TEST_P(XdsFederationTest, TargetUriAuthorityUnknown) {
}
TEST_P ( XdsFederationTest , RdsResourceNameAuthorityUnknown ) {
ScopedExperimentalEnvVar env_var ( " GRPC_EXPERIMENTAL_XDS_FEDERATION " ) ;
const char * kAuthority = " xds.example.com " ;
const char * kNewServerName = " whee%/server.example.com " ;
const char * kNewListenerTemplate =
@ -945,6 +952,7 @@ TEST_P(XdsFederationTest, RdsResourceNameAuthorityUnknown) {
}
TEST_P ( XdsFederationTest , CdsResourceNameAuthorityUnknown ) {
ScopedExperimentalEnvVar env_var ( " GRPC_EXPERIMENTAL_XDS_FEDERATION " ) ;
const char * kAuthority = " xds.example.com " ;
const char * kNewServerName = " whee%/server.example.com " ;
const char * kNewListenerTemplate =
@ -995,6 +1003,7 @@ TEST_P(XdsFederationTest, CdsResourceNameAuthorityUnknown) {
}
TEST_P ( XdsFederationTest , EdsResourceNameAuthorityUnknown ) {
ScopedExperimentalEnvVar env_var ( " GRPC_EXPERIMENTAL_XDS_FEDERATION " ) ;
const char * kAuthority = " xds.example.com " ;
const char * kNewServerName = " whee%/server.example.com " ;
const char * kNewListenerTemplate =
@ -1057,6 +1066,7 @@ TEST_P(XdsFederationTest, EdsResourceNameAuthorityUnknown) {
// Setting server_listener_resource_name_template to start with "xdstp:" and
// look up xds server under an authority map.
TEST_P ( XdsFederationTest , FederationServer ) {
ScopedExperimentalEnvVar env_var ( " GRPC_EXPERIMENTAL_XDS_FEDERATION " ) ;
const char * kAuthority = " xds.example.com " ;
const char * kNewListenerTemplate =
" xdstp://xds.example.com/envoy.config.listener.v3.Listener/ "
@ -1144,11 +1154,7 @@ INSTANTIATE_TEST_SUITE_P(
: : testing : : Values ( XdsTestType ( ) . set_enable_rds_testing ( ) ) ,
& XdsTestType : : Name ) ;
// TODO(roth,apolcyn): remove this test when the
// GRPC_EXPERIMENTAL_XDS_FEDERATION env var is removed.
TEST_P ( XdsFederationDisabledTest , FederationDisabledWithNewStyleNames ) {
grpc_core : : testing : : ScopedEnvVar env_var ( " GRPC_EXPERIMENTAL_XDS_FEDERATION " ,
" false " ) ;
const char * kNewRouteConfigName =
" xdstp://xds.example.com/envoy.config.route.v3.RouteConfiguration/ "
" new_route_config_name " ;
@ -1207,6 +1213,7 @@ INSTANTIATE_TEST_SUITE_P(
// Sending traffic to both default balancer and authority balancer and checking
// load reporting with each one.
TEST_P ( XdsFederationLoadReportingTest , FederationMultipleLoadReportingTest ) {
ScopedExperimentalEnvVar env_var ( " GRPC_EXPERIMENTAL_XDS_FEDERATION " ) ;
const char * kAuthority = " xds.example.com " ;
const char * kNewServerName = " whee%/server.example.com " ;
const char * kNewListenerTemplate =