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