mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2024-12-05 01:52:46 +00:00
fix test relying on byteutil exported type no longer existing
This commit is contained in:
parent
8b1a1e1c3d
commit
2e2fe05f0c
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue