diff options
| author | 2025-03-05 19:12:53 +0100 | |
|---|---|---|
| committer | 2025-03-05 19:12:53 +0100 | |
| commit | 69461c461b79dbeb9b55ba83d2b7308772194d7f (patch) | |
| tree | 481f39bd01ded500989faa658069db6cc0fce7dc /internal/transport/delivery/worker_test.go | |
| parent | [feature] Add token review / delete to backend + settings panel (#3845) (diff) | |
| download | gotosocial-69461c461b79dbeb9b55ba83d2b7308772194d7f.tar.xz | |
[bugfix] Return useful err on `server start` failure (#3879)
* [bugfix] Return useful err on `server start` failure
* remove scheduler started func
* remove tryUntil
Diffstat (limited to 'internal/transport/delivery/worker_test.go')
| -rw-r--r-- | internal/transport/delivery/worker_test.go | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/internal/transport/delivery/worker_test.go b/internal/transport/delivery/worker_test.go index 192ffcd37..72f485e68 100644 --- a/internal/transport/delivery/worker_test.go +++ b/internal/transport/delivery/worker_test.go @@ -24,11 +24,11 @@ import ( "math/rand" "net" "net/http" + "net/netip" "strconv" "strings" "testing" - "github.com/superseriousbusiness/gotosocial/internal/config" "github.com/superseriousbusiness/gotosocial/internal/httpclient" "github.com/superseriousbusiness/gotosocial/internal/queue" "github.com/superseriousbusiness/gotosocial/internal/transport/delivery" @@ -44,11 +44,8 @@ func TestDeliveryWorkerPool(t *testing.T) { func testDeliveryWorkerPool(t *testing.T, sz int, input []*testrequest) { wp := new(delivery.WorkerPool) - wp.Init(httpclient.New(httpclient.Config{ - AllowRanges: config.MustParseIPPrefixes([]string{ - "127.0.0.0/8", - }), - })) + allowLocal := []netip.Prefix{netip.MustParsePrefix("127.0.0.0/8")} + wp.Init(httpclient.New(httpclient.Config{AllowRanges: allowLocal})) wp.Start(sz) defer wp.Stop() test(t, &wp.Queue, input) |
