@@ -61,7 +61,7 @@ func TestNewDefaultKeepaliveClientConfig(t *testing.T) {
61
61
62
62
func TestNewDefaultClientConfig (t * testing.T ) {
63
63
expected := & ClientConfig {
64
- TLSSetting : configtls .NewDefaultClientConfig (),
64
+ TLS : configtls .NewDefaultClientConfig (),
65
65
Keepalive : NewDefaultKeepaliveClientConfig (),
66
66
BalancerName : BalancerName (),
67
67
}
@@ -113,22 +113,22 @@ var (
113
113
114
114
func TestDefaultGrpcClientSettings (t * testing.T ) {
115
115
gcs := & ClientConfig {
116
- TLSSetting : configtls.ClientConfig {
116
+ TLS : configtls.ClientConfig {
117
117
Insecure : true ,
118
118
},
119
119
}
120
120
opts , err := gcs .getGrpcDialOptions (context .Background (), componenttest .NewNopHost (), componenttest .NewNopTelemetrySettings (), []ToClientConnOption {})
121
121
require .NoError (t , err )
122
122
/* Expecting 2 DialOptions:
123
- * - WithTransportCredentials (TLSSetting )
123
+ * - WithTransportCredentials (TLS )
124
124
* - WithStatsHandler (always, for self-telemetry)
125
125
*/
126
126
assert .Len (t , opts , 2 )
127
127
}
128
128
129
129
func TestGrpcClientExtraOption (t * testing.T ) {
130
130
gcs := & ClientConfig {
131
- TLSSetting : configtls.ClientConfig {
131
+ TLS : configtls.ClientConfig {
132
132
Insecure : true ,
133
133
},
134
134
}
@@ -141,7 +141,7 @@ func TestGrpcClientExtraOption(t *testing.T) {
141
141
)
142
142
require .NoError (t , err )
143
143
/* Expecting 3 DialOptions:
144
- * - WithTransportCredentials (TLSSetting )
144
+ * - WithTransportCredentials (TLS )
145
145
* - WithStatsHandler (always, for self-telemetry)
146
146
* - extraOpt
147
147
*/
@@ -163,7 +163,7 @@ func TestAllGrpcClientSettings(t *testing.T) {
163
163
},
164
164
Endpoint : "localhost:1234" ,
165
165
Compression : configcompression .TypeGzip ,
166
- TLSSetting : configtls.ClientConfig {
166
+ TLS : configtls.ClientConfig {
167
167
Insecure : false ,
168
168
},
169
169
Keepalive : & KeepaliveClientConfig {
@@ -192,7 +192,7 @@ func TestAllGrpcClientSettings(t *testing.T) {
192
192
},
193
193
Endpoint : "localhost:1234" ,
194
194
Compression : configcompression .TypeSnappy ,
195
- TLSSetting : configtls.ClientConfig {
195
+ TLS : configtls.ClientConfig {
196
196
Insecure : false ,
197
197
},
198
198
Keepalive : & KeepaliveClientConfig {
@@ -221,7 +221,7 @@ func TestAllGrpcClientSettings(t *testing.T) {
221
221
},
222
222
Endpoint : "localhost:1234" ,
223
223
Compression : configcompression .TypeZstd ,
224
- TLSSetting : configtls.ClientConfig {
224
+ TLS : configtls.ClientConfig {
225
225
Insecure : false ,
226
226
},
227
227
Keepalive : & KeepaliveClientConfig {
@@ -249,7 +249,7 @@ func TestAllGrpcClientSettings(t *testing.T) {
249
249
require .NoError (t , err )
250
250
/* Expecting 11 DialOptions:
251
251
* - WithDefaultCallOptions (Compression)
252
- * - WithTransportCredentials (TLSSetting )
252
+ * - WithTransportCredentials (TLS )
253
253
* - WithDefaultServiceConfig (BalancerName)
254
254
* - WithAuthority (Authority)
255
255
* - WithStatsHandler (always, for self-telemetry)
@@ -277,7 +277,7 @@ func TestHeaders(t *testing.T) {
277
277
// Create client and send request to server with headers
278
278
resp , errResp := sendTestRequest (t , ClientConfig {
279
279
Endpoint : addr ,
280
- TLSSetting : configtls.ClientConfig {
280
+ TLS : configtls.ClientConfig {
281
281
Insecure : true ,
282
282
},
283
283
Headers : map [string ]configopaque.String {
@@ -380,7 +380,7 @@ func TestAllGrpcServerSettingsExceptAuth(t *testing.T) {
380
380
Endpoint : "localhost:1234" ,
381
381
Transport : confignet .TransportTypeTCP ,
382
382
},
383
- TLSSetting : & configtls.ServerConfig {
383
+ TLS : & configtls.ServerConfig {
384
384
Config : configtls.Config {},
385
385
ClientCAFile : "" ,
386
386
},
@@ -434,7 +434,7 @@ func TestGrpcClientConfigInvalidBalancer(t *testing.T) {
434
434
},
435
435
Endpoint : "localhost:1234" ,
436
436
Compression : "gzip" ,
437
- TLSSetting : configtls.ClientConfig {
437
+ TLS : configtls.ClientConfig {
438
438
Insecure : false ,
439
439
},
440
440
Keepalive : & KeepaliveClientConfig {
@@ -462,7 +462,7 @@ func TestGRPCClientSettingsError(t *testing.T) {
462
462
Headers : nil ,
463
463
Endpoint : "" ,
464
464
Compression : "" ,
465
- TLSSetting : configtls.ClientConfig {
465
+ TLS : configtls.ClientConfig {
466
466
Config : configtls.Config {
467
467
CAFile : "/doesnt/exist" ,
468
468
},
@@ -478,7 +478,7 @@ func TestGRPCClientSettingsError(t *testing.T) {
478
478
Headers : nil ,
479
479
Endpoint : "" ,
480
480
Compression : "" ,
481
- TLSSetting : configtls.ClientConfig {
481
+ TLS : configtls.ClientConfig {
482
482
Config : configtls.Config {
483
483
CertFile : "/doesnt/exist" ,
484
484
},
@@ -508,7 +508,7 @@ func TestGRPCClientSettingsError(t *testing.T) {
508
508
err : "unsupported compression type \" zlib\" " ,
509
509
settings : ClientConfig {
510
510
Endpoint : "localhost:1234" ,
511
- TLSSetting : configtls.ClientConfig {
511
+ TLS : configtls.ClientConfig {
512
512
Insecure : true ,
513
513
},
514
514
Compression : "zlib" ,
@@ -519,7 +519,7 @@ func TestGRPCClientSettingsError(t *testing.T) {
519
519
err : "unsupported compression type \" deflate\" " ,
520
520
settings : ClientConfig {
521
521
Endpoint : "localhost:1234" ,
522
- TLSSetting : configtls.ClientConfig {
522
+ TLS : configtls.ClientConfig {
523
523
Insecure : true ,
524
524
},
525
525
Compression : "deflate" ,
@@ -530,7 +530,7 @@ func TestGRPCClientSettingsError(t *testing.T) {
530
530
err : "unsupported compression type \" bad\" " ,
531
531
settings : ClientConfig {
532
532
Endpoint : "localhost:1234" ,
533
- TLSSetting : configtls.ClientConfig {
533
+ TLS : configtls.ClientConfig {
534
534
Insecure : true ,
535
535
},
536
536
Compression : "bad" ,
@@ -553,7 +553,7 @@ func TestUseSecure(t *testing.T) {
553
553
Headers : nil ,
554
554
Endpoint : "" ,
555
555
Compression : "" ,
556
- TLSSetting : configtls.ClientConfig {},
556
+ TLS : configtls.ClientConfig {},
557
557
Keepalive : nil ,
558
558
}
559
559
dialOpts , err := gcs .getGrpcDialOptions (context .Background (), componenttest .NewNopHost (), componenttest .NewNopTelemetrySettings (), []ToClientConnOption {})
@@ -573,7 +573,7 @@ func TestGRPCServerSettingsError(t *testing.T) {
573
573
Endpoint : "127.0.0.1:1234" ,
574
574
Transport : confignet .TransportTypeTCP ,
575
575
},
576
- TLSSetting : & configtls.ServerConfig {
576
+ TLS : & configtls.ServerConfig {
577
577
Config : configtls.Config {
578
578
CAFile : "/doesnt/exist" ,
579
579
},
@@ -587,7 +587,7 @@ func TestGRPCServerSettingsError(t *testing.T) {
587
587
Endpoint : "127.0.0.1:1234" ,
588
588
Transport : confignet .TransportTypeTCP ,
589
589
},
590
- TLSSetting : & configtls.ServerConfig {
590
+ TLS : & configtls.ServerConfig {
591
591
Config : configtls.Config {
592
592
CertFile : "/doesnt/exist" ,
593
593
},
@@ -601,7 +601,7 @@ func TestGRPCServerSettingsError(t *testing.T) {
601
601
Endpoint : "127.0.0.1:1234" ,
602
602
Transport : confignet .TransportTypeTCP ,
603
603
},
604
- TLSSetting : & configtls.ServerConfig {
604
+ TLS : & configtls.ServerConfig {
605
605
ClientCAFile : "/doesnt/exist" ,
606
606
},
607
607
},
@@ -738,13 +738,13 @@ func TestHttpReception(t *testing.T) {
738
738
Endpoint : "localhost:0" ,
739
739
Transport : confignet .TransportTypeTCP ,
740
740
},
741
- TLSSetting : test .tlsServerCreds ,
741
+ TLS : test .tlsServerCreds ,
742
742
})
743
743
defer s .Stop ()
744
744
745
745
resp , errResp := sendTestRequest (t , ClientConfig {
746
- Endpoint : addr ,
747
- TLSSetting : * test .tlsClientCreds ,
746
+ Endpoint : addr ,
747
+ TLS : * test .tlsClientCreds ,
748
748
})
749
749
if test .hasError {
750
750
require .Error (t , errResp )
@@ -772,7 +772,7 @@ func TestReceiveOnUnixDomainSocket(t *testing.T) {
772
772
773
773
resp , errResp := sendTestRequest (t , ClientConfig {
774
774
Endpoint : "unix://" + addr ,
775
- TLSSetting : configtls.ClientConfig {
775
+ TLS : configtls.ClientConfig {
776
776
Insecure : true ,
777
777
},
778
778
})
@@ -955,7 +955,7 @@ func TestClientInfoInterceptors(t *testing.T) {
955
955
{
956
956
resp , errResp := sendTestRequest (t , ClientConfig {
957
957
Endpoint : addr ,
958
- TLSSetting : configtls.ClientConfig {
958
+ TLS : configtls.ClientConfig {
959
959
Insecure : true ,
960
960
},
961
961
})
0 commit comments