From 044be4820fd437a4d13e5d6505808aeb6b2875aa Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Fri, 12 May 2023 13:47:47 +1000 Subject: [PATCH] gorond test files --- bencode/bench_test.go | 1 + client-nowasm_test.go | 5 +++-- client_test.go | 10 ++++------ internal/nestedmaps/nestedmaps_test.go | 3 +-- network_test.go | 1 - peer_protocol/pex_test.go | 2 +- peerconn_test.go | 3 +-- pex_test.go | 2 +- requesting_test.go | 3 ++- reuse_test.go | 1 - storage/safe-path_test.go | 3 ++- storage/sqlite/sqlite-storage_test.go | 5 +++-- test/issue377_test.go | 3 +-- test/transfer_test.go | 10 +++++----- tracker/http/http_test.go | 5 +++-- tracker/udp-server_test.go | 1 + tracker/udp_test.go | 3 ++- utp_test.go | 1 - 18 files changed, 31 insertions(+), 31 deletions(-) diff --git a/bencode/bench_test.go b/bencode/bench_test.go index d6faafb7..5cf1ce89 100644 --- a/bencode/bench_test.go +++ b/bencode/bench_test.go @@ -6,6 +6,7 @@ import ( "testing" "github.com/anacrolix/dht/v2/krpc" + "github.com/anacrolix/torrent/bencode" ) diff --git a/client-nowasm_test.go b/client-nowasm_test.go index 62c5a1db..5c7f6251 100644 --- a/client-nowasm_test.go +++ b/client-nowasm_test.go @@ -7,10 +7,11 @@ import ( "os" "testing" - "github.com/anacrolix/torrent/internal/testutil" - "github.com/anacrolix/torrent/storage" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/anacrolix/torrent/internal/testutil" + "github.com/anacrolix/torrent/storage" ) func TestBoltPieceCompletionClosedWhenClientClosed(t *testing.T) { diff --git a/client_test.go b/client_test.go index c8624395..e23ca1fa 100644 --- a/client_test.go +++ b/client_test.go @@ -13,15 +13,13 @@ import ( "testing/iotest" "time" - "github.com/frankban/quicktest" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - - "github.com/anacrolix/log" - "github.com/anacrolix/dht/v2" + "github.com/anacrolix/log" "github.com/anacrolix/missinggo/v2" "github.com/anacrolix/missinggo/v2/filecache" + "github.com/frankban/quicktest" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/anacrolix/torrent/bencode" "github.com/anacrolix/torrent/internal/testutil" diff --git a/internal/nestedmaps/nestedmaps_test.go b/internal/nestedmaps/nestedmaps_test.go index af808eb9..97916afb 100644 --- a/internal/nestedmaps/nestedmaps_test.go +++ b/internal/nestedmaps/nestedmaps_test.go @@ -3,9 +3,8 @@ package nestedmaps import ( "testing" - qt "github.com/frankban/quicktest" - g "github.com/anacrolix/generics" + qt "github.com/frankban/quicktest" ) func TestNestedMaps(t *testing.T) { diff --git a/network_test.go b/network_test.go index f6b1bc8c..5e912cc4 100644 --- a/network_test.go +++ b/network_test.go @@ -5,7 +5,6 @@ import ( "testing" "github.com/anacrolix/log" - "github.com/anacrolix/missinggo/v2" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/peer_protocol/pex_test.go b/peer_protocol/pex_test.go index cc45059e..5e5e96c1 100644 --- a/peer_protocol/pex_test.go +++ b/peer_protocol/pex_test.go @@ -6,9 +6,9 @@ import ( "net" "testing" + "github.com/anacrolix/dht/v2/krpc" "github.com/stretchr/testify/require" - "github.com/anacrolix/dht/v2/krpc" "github.com/anacrolix/torrent/bencode" ) diff --git a/peerconn_test.go b/peerconn_test.go index f0a5a6fd..e418e07e 100644 --- a/peerconn_test.go +++ b/peerconn_test.go @@ -9,11 +9,10 @@ import ( "sync" "testing" - "golang.org/x/time/rate" - "github.com/frankban/quicktest" qt "github.com/frankban/quicktest" "github.com/stretchr/testify/require" + "golang.org/x/time/rate" "github.com/anacrolix/torrent/metainfo" pp "github.com/anacrolix/torrent/peer_protocol" diff --git a/pex_test.go b/pex_test.go index 2b973296..7d8f6d5d 100644 --- a/pex_test.go +++ b/pex_test.go @@ -4,10 +4,10 @@ import ( "net" "testing" + "github.com/anacrolix/dht/v2/krpc" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/anacrolix/dht/v2/krpc" pp "github.com/anacrolix/torrent/peer_protocol" ) diff --git a/requesting_test.go b/requesting_test.go index 5e58df5c..6c791a58 100644 --- a/requesting_test.go +++ b/requesting_test.go @@ -3,9 +3,10 @@ package torrent import ( "testing" - pp "github.com/anacrolix/torrent/peer_protocol" "github.com/bradfitz/iter" qt "github.com/frankban/quicktest" + + pp "github.com/anacrolix/torrent/peer_protocol" ) func keysAsSlice(m map[Request]struct{}) (sl []Request) { diff --git a/reuse_test.go b/reuse_test.go index 40df9a3e..ba53f288 100644 --- a/reuse_test.go +++ b/reuse_test.go @@ -9,7 +9,6 @@ import ( "testing" "github.com/anacrolix/log" - qt "github.com/frankban/quicktest" ) diff --git a/storage/safe-path_test.go b/storage/safe-path_test.go index 674da8fc..452ab283 100644 --- a/storage/safe-path_test.go +++ b/storage/safe-path_test.go @@ -6,8 +6,9 @@ import ( "path/filepath" "testing" - "github.com/anacrolix/torrent/metainfo" qt "github.com/frankban/quicktest" + + "github.com/anacrolix/torrent/metainfo" ) func init() { diff --git a/storage/sqlite/sqlite-storage_test.go b/storage/sqlite/sqlite-storage_test.go index 390c68f4..d2f16af7 100644 --- a/storage/sqlite/sqlite-storage_test.go +++ b/storage/sqlite/sqlite-storage_test.go @@ -12,11 +12,12 @@ import ( _ "github.com/anacrolix/envpprof" "github.com/anacrolix/squirrel" + "github.com/dustin/go-humanize" + qt "github.com/frankban/quicktest" + "github.com/anacrolix/torrent/storage" test_storage "github.com/anacrolix/torrent/storage/test" "github.com/anacrolix/torrent/test" - "github.com/dustin/go-humanize" - qt "github.com/frankban/quicktest" ) func TestLeecherStorage(t *testing.T) { diff --git a/test/issue377_test.go b/test/issue377_test.go index 48e5abfb..5b0e659f 100644 --- a/test/issue377_test.go +++ b/test/issue377_test.go @@ -9,14 +9,13 @@ import ( "testing/iotest" "github.com/anacrolix/log" - pp "github.com/anacrolix/torrent/peer_protocol" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/anacrolix/torrent" "github.com/anacrolix/torrent/internal/testutil" "github.com/anacrolix/torrent/metainfo" + pp "github.com/anacrolix/torrent/peer_protocol" "github.com/anacrolix/torrent/storage" ) diff --git a/test/transfer_test.go b/test/transfer_test.go index fa159326..a008d26f 100644 --- a/test/transfer_test.go +++ b/test/transfer_test.go @@ -10,14 +10,14 @@ import ( "time" "github.com/anacrolix/missinggo/v2/filecache" - "github.com/anacrolix/torrent" - "github.com/anacrolix/torrent/internal/testutil" - "github.com/anacrolix/torrent/storage" qt "github.com/frankban/quicktest" - "golang.org/x/time/rate" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "golang.org/x/time/rate" + + "github.com/anacrolix/torrent" + "github.com/anacrolix/torrent/internal/testutil" + "github.com/anacrolix/torrent/storage" ) type fileCacheClientStorageFactoryParams struct { diff --git a/tracker/http/http_test.go b/tracker/http/http_test.go index 7fd98a5d..4e5efaf5 100644 --- a/tracker/http/http_test.go +++ b/tracker/http/http_test.go @@ -4,11 +4,12 @@ import ( "net/url" "testing" - "github.com/anacrolix/torrent/bencode" - "github.com/anacrolix/torrent/tracker/udp" qt "github.com/frankban/quicktest" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/anacrolix/torrent/bencode" + "github.com/anacrolix/torrent/tracker/udp" ) func TestUnmarshalHTTPResponsePeerDicts(t *testing.T) { diff --git a/tracker/udp-server_test.go b/tracker/udp-server_test.go index 7308ed0d..84408bfd 100644 --- a/tracker/udp-server_test.go +++ b/tracker/udp-server_test.go @@ -10,6 +10,7 @@ import ( "github.com/anacrolix/dht/v2/krpc" "github.com/anacrolix/missinggo/v2" + "github.com/anacrolix/torrent/tracker/udp" ) diff --git a/tracker/udp_test.go b/tracker/udp_test.go index 751e41b9..cf18e0de 100644 --- a/tracker/udp_test.go +++ b/tracker/udp_test.go @@ -15,9 +15,10 @@ 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{ diff --git a/utp_test.go b/utp_test.go index 64dd4cc0..18d62cab 100644 --- a/utp_test.go +++ b/utp_test.go @@ -4,7 +4,6 @@ import ( "testing" "github.com/anacrolix/log" - "github.com/stretchr/testify/assert" ) -- 2.44.0