mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2024-12-05 18:12: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
|
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 {
|
||||||
|
|
Loading…
Reference in a new issue