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 return client
} }
client := cp.createClient(key) client := cp.createClient()
cp.clients[key] = client cp.clients[key] = client
return client return client
} }
// createClient creates a new HTTP client with optimized connection pooling // 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{ transport := &http.Transport{
Proxy: proxy.Proxy(), Proxy: proxy.Proxy(),
DialContext: (&net.Dialer{ DialContext: (&net.Dialer{

View file

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

View file

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