fix test relying on byteutil exported type no longer existing

This commit is contained in:
kim 2024-09-26 20:25:02 +01:00
parent 8b1a1e1c3d
commit 2e2fe05f0c

View file

@ -18,6 +18,7 @@
package delivery_test package delivery_test
import ( import (
"bytes"
"fmt" "fmt"
"io" "io"
"math/rand" "math/rand"
@ -27,7 +28,6 @@
"strings" "strings"
"testing" "testing"
"codeberg.org/gruf/go-byteutil"
"github.com/superseriousbusiness/gotosocial/internal/config" "github.com/superseriousbusiness/gotosocial/internal/config"
"github.com/superseriousbusiness/gotosocial/internal/httpclient" "github.com/superseriousbusiness/gotosocial/internal/httpclient"
"github.com/superseriousbusiness/gotosocial/internal/queue" "github.com/superseriousbusiness/gotosocial/internal/queue"
@ -176,9 +176,9 @@ func requiresBody(method string) bool {
func (t *testrequest) Generate(addr string) *http.Request { func (t *testrequest) Generate(addr string) *http.Request {
var body io.ReadCloser var body io.ReadCloser
if t.body != nil { if t.body != nil {
var b byteutil.ReadNopCloser var b bytes.Reader
b.Reset(t.body) b.Reset(t.body)
body = &b body = io.NopCloser(&b)
} }
req, err := http.NewRequest(t.method, addr+t.uri, body) req, err := http.NewRequest(t.method, addr+t.uri, body)
if err != nil { if err != nil {