@@ -339,7 +339,7 @@ func waitUntilEndpointSynchronized(ctx context.Context, c driver.Client, dbname
339
339
func TestCreateClientHttpConnection (t * testing.T ) {
340
340
conn , err := http .NewConnection (http.ConnectionConfig {
341
341
Endpoints : getEndpointsFromEnv (t ),
342
- TLSConfig : & tls. Config { InsecureSkipVerify : true } ,
342
+ Transport : NewConnectionTransport () ,
343
343
})
344
344
if err != nil {
345
345
t .Fatalf ("Failed to create new http connection: %s" , describe (err ))
@@ -353,37 +353,6 @@ func TestCreateClientHttpConnection(t *testing.T) {
353
353
}
354
354
}
355
355
356
- // TestCreateClientHttpConnectionCustomTransport creates an HTTP connection to the environment specified
357
- // endpoints with a custom HTTP roundtripper and creates a client for that.
358
- func TestCreateClientHttpConnectionCustomTransport (t * testing.T ) {
359
- conn , err := http .NewConnection (http.ConnectionConfig {
360
- Endpoints : getEndpointsFromEnv (t ),
361
- Transport : & httplib.Transport {},
362
- TLSConfig : & tls.Config {InsecureSkipVerify : true },
363
- })
364
- if err != nil {
365
- t .Fatalf ("Failed to create new http connection: %s" , describe (err ))
366
- }
367
- c , err := driver .NewClient (driver.ClientConfig {
368
- Connection : conn ,
369
- Authentication : createAuthenticationFromEnv (t ),
370
- })
371
- if err != nil {
372
- t .Fatalf ("Failed to create new client: %s" , describe (err ))
373
- }
374
- timeout := 3 * time .Minute
375
- ctx , cancel := context .WithTimeout (context .Background (), timeout )
376
- defer cancel ()
377
- if up := waitUntilServerAvailable (ctx , c , t ); up != nil {
378
- t .Fatalf ("Connection is not available in %s: %s" , timeout , describe (up ))
379
- }
380
- if info , err := c .Version (driver .WithDetails (ctx )); err != nil {
381
- t .Errorf ("Version failed: %s" , describe (err ))
382
- } else {
383
- t .Logf ("Got server version %s" , info )
384
- }
385
- }
386
-
387
356
// TestResponseHeader checks the Response.Header function.
388
357
func TestResponseHeader (t * testing.T ) {
389
358
c := createClientFromEnv (t , true )
0 commit comments