@@ -339,7 +339,7 @@ func waitUntilEndpointSynchronized(ctx context.Context, c driver.Client, dbname
339339func TestCreateClientHttpConnection (t * testing.T ) {
340340 conn , err := http .NewConnection (http.ConnectionConfig {
341341 Endpoints : getEndpointsFromEnv (t ),
342- TLSConfig : & tls. Config { InsecureSkipVerify : true } ,
342+ Transport : NewConnectionTransport () ,
343343 })
344344 if err != nil {
345345 t .Fatalf ("Failed to create new http connection: %s" , describe (err ))
@@ -353,37 +353,6 @@ func TestCreateClientHttpConnection(t *testing.T) {
353353 }
354354}
355355
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-
387356// TestResponseHeader checks the Response.Header function.
388357func TestResponseHeader (t * testing.T ) {
389358 c := createClientFromEnv (t , true )
0 commit comments