]> Sergey Matveev's repositories - btrtrc.git/blobdiff - tracker/udp_test.go
chore: remove refs to deprecated io/ioutil
[btrtrc.git] / tracker / udp_test.go
index 7354063b69dd664569341b3c3c1131135daa5d52..232aeb1973a51f0229b6591894473ea4a61c94c8 100644 (file)
@@ -6,7 +6,7 @@ import (
        "crypto/rand"
        "errors"
        "fmt"
-       "io/ioutil"
+       "io"
        "net"
        "net/url"
        "sync"
@@ -15,14 +15,16 @@ import (
 
        "github.com/anacrolix/dht/v2/krpc"
        _ "github.com/anacrolix/envpprof"
-       "github.com/anacrolix/torrent/tracker/udp"
        "github.com/stretchr/testify/assert"
        "github.com/stretchr/testify/require"
+
+       "github.com/anacrolix/torrent/tracker/udp"
 )
 
 var trackers = []string{
        "udp://tracker.opentrackr.org:1337/announce",
        "udp://tracker.openbittorrent.com:6969/announce",
+       "udp://localhost:42069",
 }
 
 func TestAnnounceLocalhost(t *testing.T) {
@@ -177,7 +179,7 @@ func TestURLPathOption(t *testing.T) {
        r = bytes.NewReader(b[:n])
        udp.Read(r, &h)
        udp.Read(r, &AnnounceRequest{})
-       all, _ := ioutil.ReadAll(r)
+       all, _ := io.ReadAll(r)
        if string(all) != "\x02\x09/announce" {
                t.FailNow()
        }