1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-09-15 18:56:59 +00:00

more tests

This commit is contained in:
pat-s 2025-06-25 23:13:05 +02:00
parent 0bb7de5739
commit c5685b4ea1
No known key found for this signature in database
GPG key ID: 3C6318841EF78925
3 changed files with 4 additions and 8 deletions

View file

@ -52,13 +52,13 @@ func (cp *ClientPool) GetClient(key string) *http.Client {
return client
}
client := cp.createClient(key)
client := cp.createClient()
cp.clients[key] = client
return client
}
// createClient creates a new HTTP client with optimized connection pooling
func (cp *ClientPool) createClient(key string) *http.Client {
func (cp *ClientPool) createClient() *http.Client {
transport := &http.Transport{
Proxy: proxy.Proxy(),
DialContext: (&net.Dialer{

View file

@ -5,8 +5,6 @@
package driver
import (
"net/http"
"forgejo.org/modules/httplib"
driver_options "forgejo.org/services/f3/driver/options"
@ -16,8 +14,6 @@ import (
func newOptions() options.Interface {
o := &driver_options.Options{}
o.SetName(driver_options.Name)
o.SetNewMigrationHTTPClient(func() *http.Client {
return httplib.GetMigrationClient()
})
o.SetNewMigrationHTTPClient(httplib.GetMigrationClient)
return o
}

View file

@ -5,7 +5,6 @@ package migrations
import (
"context"
"encoding/json"
"fmt"
"net/http"
"net/url"
@ -14,6 +13,7 @@ import (
"time"
"forgejo.org/modules/httplib"
"forgejo.org/modules/json"
"forgejo.org/modules/log"
base "forgejo.org/modules/migration"
"forgejo.org/modules/structs"