@@ -430,43 +430,10 @@ func TestNewConfigV2ProtoSuccess(t *testing.T) {
430430 }
431431}
432432
433- // TestNewConfigV3SupportNotEnabledOnClient verifies bootstrap functionality
434- // when the GRPC_XDS_EXPERIMENTAL_V3_SUPPORT environment variable is not enabled
435- // on the client. In this case, whether the server supports v3 or not, the
436- // client will end up using v2.
437- func TestNewConfigV3SupportNotEnabledOnClient (t * testing.T ) {
438- origV3Support := env .V3Support
439- env .V3Support = false
440- defer func () { env .V3Support = origV3Support }()
441-
442- cancel := setupBootstrapOverride (v3BootstrapFileMap )
443- defer cancel ()
444-
445- tests := []struct {
446- name string
447- wantConfig * Config
448- }{
449- {"serverDoesNotSupportsV3" , nonNilCredsConfigV2 },
450- {"serverSupportsV3" , nonNilCredsConfigV2 },
451- }
452-
453- for _ , test := range tests {
454- t .Run (test .name , func (t * testing.T ) {
455- testNewConfigWithFileNameEnv (t , test .name , false , test .wantConfig )
456- testNewConfigWithFileContentEnv (t , test .name , false , test .wantConfig )
457- })
458- }
459- }
460-
461- // TestNewConfigV3SupportEnabledOnClient verifies bootstrap functionality when
462- // the GRPC_XDS_EXPERIMENTAL_V3_SUPPORT environment variable is enabled on the
463- // client. Here the client ends up using v2 or v3 based on what the server
464- // supports.
465- func TestNewConfigV3SupportEnabledOnClient (t * testing.T ) {
466- origV3Support := env .V3Support
467- env .V3Support = true
468- defer func () { env .V3Support = origV3Support }()
469-
433+ // TestNewConfigV3Support verifies bootstrap functionality involving support for
434+ // the xDS v3 transport protocol. Here the client ends up using v2 or v3 based
435+ // on what the server supports.
436+ func TestNewConfigV3Support (t * testing.T ) {
470437 cancel := setupBootstrapOverride (v3BootstrapFileMap )
471438 defer cancel ()
472439
@@ -486,15 +453,12 @@ func TestNewConfigV3SupportEnabledOnClient(t *testing.T) {
486453 }
487454}
488455
489- // TestNewConfigBootstrapEnvPriority tests that the two env variables are read in correct priority
456+ // TestNewConfigBootstrapEnvPriority tests that the two env variables are read
457+ // in correct priority.
490458//
491459// the case where the bootstrap file
492460// environment variable is not set.
493461func TestNewConfigBootstrapEnvPriority (t * testing.T ) {
494- origV3Support := env .V3Support
495- env .V3Support = true
496- defer func () { env .V3Support = origV3Support }()
497-
498462 oldFileReadFunc := bootstrapFileReadFunc
499463 bootstrapFileReadFunc = func (filename string ) ([]byte , error ) {
500464 return fileReadFromFileMap (v2BootstrapFileMap , filename )
@@ -702,10 +666,6 @@ func TestNewConfigWithCertificateProviders(t *testing.T) {
702666 t .Fatalf ("config parsing for plugin %q failed: %v" , fakeCertProviderName , err )
703667 }
704668
705- origV3Support := env .V3Support
706- env .V3Support = true
707- defer func () { env .V3Support = origV3Support }()
708-
709669 cancel := setupBootstrapOverride (bootstrapFileMap )
710670 defer cancel ()
711671
0 commit comments