From 111dcc80f21b734da30f7a421d483d407e0c27e7 Mon Sep 17 00:00:00 2001 From: gammazero Date: Wed, 26 Jun 2024 09:37:37 -0700 Subject: [PATCH] use ipfs/go-test --- cardatatransfer/cardatatransfer_test.go | 2 +- delegatedrouting/listener_concurrency_test.go | 2 +- delegatedrouting/listener_test.go | 2 +- engine/chunker/benchmark_test.go | 2 +- engine/chunker/cached_chunker_test.go | 2 +- engine/chunker/chain_chunker_test.go | 2 +- engine/chunker/hamt_chunker_test.go | 2 +- engine/engine_test.go | 2 +- engine/linksystem_test.go | 2 +- engine/xproviders/xproviders_test.go | 2 +- go.mod | 2 +- go.sum | 4 ++-- mirror/mirror_test.go | 2 +- server/admin/http/car_handler_test.go | 2 +- 14 files changed, 15 insertions(+), 15 deletions(-) diff --git a/cardatatransfer/cardatatransfer_test.go b/cardatatransfer/cardatatransfer_test.go index d22b076..a47dee6 100644 --- a/cardatatransfer/cardatatransfer_test.go +++ b/cardatatransfer/cardatatransfer_test.go @@ -16,6 +16,7 @@ import ( "github.com/ipfs/go-datastore" dssync "github.com/ipfs/go-datastore/sync" "github.com/ipfs/go-graphsync/storeutil" + "github.com/ipfs/go-test/random" dagpb "github.com/ipld/go-codec-dagpb" "github.com/ipld/go-ipld-prime" "github.com/ipld/go-ipld-prime/datamodel" @@ -30,7 +31,6 @@ import ( "github.com/ipni/index-provider/cardatatransfer" "github.com/ipni/index-provider/supplier" "github.com/ipni/index-provider/testutil" - "github.com/ipni/test/random" mocknet "github.com/libp2p/go-libp2p/p2p/net/mock" "github.com/stretchr/testify/require" ) diff --git a/delegatedrouting/listener_concurrency_test.go b/delegatedrouting/listener_concurrency_test.go index 541aa68..cc6fffb 100644 --- a/delegatedrouting/listener_concurrency_test.go +++ b/delegatedrouting/listener_concurrency_test.go @@ -12,10 +12,10 @@ import ( "github.com/ipfs/go-cid" "github.com/ipfs/go-datastore" leveldb "github.com/ipfs/go-ds-leveldb" + "github.com/ipfs/go-test/random" drouting "github.com/ipni/index-provider/delegatedrouting" "github.com/ipni/index-provider/engine" mock_provider "github.com/ipni/index-provider/mock" - "github.com/ipni/test/random" "github.com/libp2p/go-libp2p" "github.com/stretchr/testify/require" ) diff --git a/delegatedrouting/listener_test.go b/delegatedrouting/listener_test.go index 8115e6b..a1215e1 100644 --- a/delegatedrouting/listener_test.go +++ b/delegatedrouting/listener_test.go @@ -15,12 +15,12 @@ import ( "github.com/ipfs/boxo/routing/http/server" "github.com/ipfs/go-cid" "github.com/ipfs/go-datastore" + "github.com/ipfs/go-test/random" cidlink "github.com/ipld/go-ipld-prime/linking/cid" "github.com/ipni/go-libipni/metadata" drouting "github.com/ipni/index-provider/delegatedrouting" "github.com/ipni/index-provider/engine" mock_provider "github.com/ipni/index-provider/mock" - "github.com/ipni/test/random" "github.com/libp2p/go-libp2p" "github.com/libp2p/go-libp2p/core/crypto" "github.com/libp2p/go-libp2p/core/peer" diff --git a/engine/chunker/benchmark_test.go b/engine/chunker/benchmark_test.go index 9ec6535..3a94b6a 100644 --- a/engine/chunker/benchmark_test.go +++ b/engine/chunker/benchmark_test.go @@ -7,9 +7,9 @@ import ( "github.com/ipfs/go-datastore" dssync "github.com/ipfs/go-datastore/sync" + "github.com/ipfs/go-test/random" provider "github.com/ipni/index-provider" "github.com/ipni/index-provider/engine/chunker" - "github.com/ipni/test/random" "github.com/multiformats/go-multicodec" "github.com/multiformats/go-multihash" "github.com/stretchr/testify/require" diff --git a/engine/chunker/cached_chunker_test.go b/engine/chunker/cached_chunker_test.go index dfff195..576caf2 100644 --- a/engine/chunker/cached_chunker_test.go +++ b/engine/chunker/cached_chunker_test.go @@ -11,6 +11,7 @@ import ( "github.com/ipfs/go-datastore" dssync "github.com/ipfs/go-datastore/sync" + "github.com/ipfs/go-test/random" hamt "github.com/ipld/go-ipld-adl-hamt" "github.com/ipld/go-ipld-prime" cidlink "github.com/ipld/go-ipld-prime/linking/cid" @@ -19,7 +20,6 @@ import ( "github.com/ipni/go-libipni/ingest/schema" provider "github.com/ipni/index-provider" "github.com/ipni/index-provider/engine/chunker" - "github.com/ipni/test/random" "github.com/multiformats/go-multicodec" "github.com/multiformats/go-multihash" "github.com/stretchr/testify/require" diff --git a/engine/chunker/chain_chunker_test.go b/engine/chunker/chain_chunker_test.go index 0af55c8..fde20ad 100644 --- a/engine/chunker/chain_chunker_test.go +++ b/engine/chunker/chain_chunker_test.go @@ -4,13 +4,13 @@ import ( "context" "testing" + "github.com/ipfs/go-test/random" "github.com/ipld/go-ipld-prime" cidlink "github.com/ipld/go-ipld-prime/linking/cid" "github.com/ipld/go-ipld-prime/storage/memstore" "github.com/ipni/go-libipni/ingest/schema" provider "github.com/ipni/index-provider" "github.com/ipni/index-provider/engine/chunker" - "github.com/ipni/test/random" "github.com/stretchr/testify/require" ) diff --git a/engine/chunker/hamt_chunker_test.go b/engine/chunker/hamt_chunker_test.go index 47ae692..4c7afc9 100644 --- a/engine/chunker/hamt_chunker_test.go +++ b/engine/chunker/hamt_chunker_test.go @@ -4,6 +4,7 @@ import ( "context" "testing" + "github.com/ipfs/go-test/random" hamt "github.com/ipld/go-ipld-adl-hamt" "github.com/ipld/go-ipld-prime" cidlink "github.com/ipld/go-ipld-prime/linking/cid" @@ -11,7 +12,6 @@ import ( "github.com/ipld/go-ipld-prime/storage/memstore" provider "github.com/ipni/index-provider" "github.com/ipni/index-provider/engine/chunker" - "github.com/ipni/test/random" "github.com/multiformats/go-multicodec" "github.com/stretchr/testify/require" ) diff --git a/engine/engine_test.go b/engine/engine_test.go index c4d2575..5638679 100644 --- a/engine/engine_test.go +++ b/engine/engine_test.go @@ -13,6 +13,7 @@ import ( "github.com/ipfs/go-cid" "github.com/ipfs/go-datastore" leveldb "github.com/ipfs/go-ds-leveldb" + "github.com/ipfs/go-test/random" "github.com/ipld/go-ipld-prime" cidlink "github.com/ipld/go-ipld-prime/linking/cid" "github.com/ipld/go-ipld-prime/node/basicnode" @@ -26,7 +27,6 @@ import ( provider "github.com/ipni/index-provider" "github.com/ipni/index-provider/engine" "github.com/ipni/index-provider/testutil" - "github.com/ipni/test/random" "github.com/libp2p/go-libp2p" pubsub "github.com/libp2p/go-libp2p-pubsub" "github.com/libp2p/go-libp2p/core/peer" diff --git a/engine/linksystem_test.go b/engine/linksystem_test.go index d19e99f..ac532eb 100644 --- a/engine/linksystem_test.go +++ b/engine/linksystem_test.go @@ -8,6 +8,7 @@ import ( "time" "github.com/ipfs/go-cid" + "github.com/ipfs/go-test/random" "github.com/ipld/go-car/v2/index" "github.com/ipld/go-ipld-prime" cidlink "github.com/ipld/go-ipld-prime/linking/cid" @@ -17,7 +18,6 @@ import ( provider "github.com/ipni/index-provider" "github.com/ipni/index-provider/engine" "github.com/ipni/index-provider/engine/chunker" - "github.com/ipni/test/random" "github.com/libp2p/go-libp2p/core/peer" "github.com/stretchr/testify/require" ) diff --git a/engine/xproviders/xproviders_test.go b/engine/xproviders/xproviders_test.go index f80079f..f688c87 100644 --- a/engine/xproviders/xproviders_test.go +++ b/engine/xproviders/xproviders_test.go @@ -6,11 +6,11 @@ import ( "time" "github.com/ipfs/go-cid" + "github.com/ipfs/go-test/random" cidlink "github.com/ipld/go-ipld-prime/linking/cid" "github.com/ipni/go-libipni/ingest/schema" "github.com/ipni/index-provider/engine" ep "github.com/ipni/index-provider/engine/xproviders" - "github.com/ipni/test/random" "github.com/libp2p/go-libp2p/core/peer" "github.com/multiformats/go-multiaddr" "github.com/stretchr/testify/require" diff --git a/go.mod b/go.mod index 1acaa82..aa3d1cc 100644 --- a/go.mod +++ b/go.mod @@ -12,12 +12,12 @@ require ( github.com/ipfs/go-ds-leveldb v0.5.0 github.com/ipfs/go-graphsync v0.17.0 github.com/ipfs/go-log/v2 v2.5.1 + github.com/ipfs/go-test v0.0.1 github.com/ipld/go-car/v2 v2.13.1 github.com/ipld/go-codec-dagpb v1.6.0 github.com/ipld/go-ipld-adl-hamt v0.0.0-20240322071803-376decb85801 github.com/ipld/go-ipld-prime v0.21.0 github.com/ipni/go-libipni v0.6.8 - github.com/ipni/test v0.0.4 github.com/libp2p/go-libp2p v0.35.1 github.com/libp2p/go-libp2p-pubsub v0.11.0 github.com/mitchellh/go-homedir v1.1.0 diff --git a/go.sum b/go.sum index 858121a..a3db273 100644 --- a/go.sum +++ b/go.sum @@ -347,6 +347,8 @@ github.com/ipfs/go-metrics-interface v0.0.1 h1:j+cpbjYvu4R8zbleSs36gvB7jR+wsL2fG github.com/ipfs/go-metrics-interface v0.0.1/go.mod h1:6s6euYU4zowdslK0GKHmqaIZ3j/b/tL7HTWtJ4VPgWY= github.com/ipfs/go-peertaskqueue v0.8.1 h1:YhxAs1+wxb5jk7RvS0LHdyiILpNmRIRnZVztekOF0pg= github.com/ipfs/go-peertaskqueue v0.8.1/go.mod h1:Oxxd3eaK279FxeydSPPVGHzbwVeHjatZ2GA8XD+KbPU= +github.com/ipfs/go-test v0.0.1 h1:ndnYcnWEXzYQqkYX18fh/p1Pn8HHnj1OdA/m+Z10wFE= +github.com/ipfs/go-test v0.0.1/go.mod h1:uDtFPEphmLrcPCitEY/xn1QnR7wm7iFBVrOIjkdxSZ0= github.com/ipfs/go-unixfs v0.4.5 h1:wj8JhxvV1G6CD7swACwSKYa+NgtdWC1RUit+gFnymDU= github.com/ipfs/go-unixfs v0.4.5/go.mod h1:BIznJNvt/gEx/ooRMI4Us9K8+qeGO7vx1ohnbk8gjFg= github.com/ipfs/go-unixfsnode v1.9.0 h1:ubEhQhr22sPAKO2DNsyVBW7YB/zA8Zkif25aBvz8rc8= @@ -365,8 +367,6 @@ github.com/ipld/go-ipld-prime/storage/bsadapter v0.0.0-20230102063945-1a409dc236 github.com/ipld/go-ipld-prime/storage/bsadapter v0.0.0-20230102063945-1a409dc236dd/go.mod h1:wZ8hH8UxeryOs4kJEJaiui/s00hDSbE37OKsL47g+Sw= github.com/ipni/go-libipni v0.6.8 h1:bwyu7g+1jwgCptabQ6It2VtFucFJIsOckzQNBBObHoE= github.com/ipni/go-libipni v0.6.8/go.mod h1:yXjq2JgqPMcubWpJie3OjyG0HNIoRdbmqxQMx+gF4TM= -github.com/ipni/test v0.0.4 h1:RTf4XA35zGEc+iDa+qFCEFxw4RvUQSeMQ4LH6jlj3VE= -github.com/ipni/test v0.0.4/go.mod h1:+zqwOJ0gz7N5+y75v/xBeFA/F6sofois7K11ARS3QxA= github.com/ipsn/go-secp256k1 v0.0.0-20180726113642-9d62b9f0bc52 h1:QG4CGBqCeuBo6aZlGAamSkxWdgWfZGeE49eUOWJPA4c= github.com/ipsn/go-secp256k1 v0.0.0-20180726113642-9d62b9f0bc52/go.mod h1:fdg+/X9Gg4AsAIzWpEHwnqd+QY3b7lajxyjE1m4hkq4= github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= diff --git a/mirror/mirror_test.go b/mirror/mirror_test.go index 9591f08..ce33cb3 100644 --- a/mirror/mirror_test.go +++ b/mirror/mirror_test.go @@ -6,13 +6,13 @@ import ( "time" "github.com/ipfs/go-cid" + "github.com/ipfs/go-test/random" cidlink "github.com/ipld/go-ipld-prime/linking/cid" selectorparse "github.com/ipld/go-ipld-prime/traversal/selector/parse" "github.com/ipni/go-libipni/ingest/schema" "github.com/ipni/go-libipni/metadata" "github.com/ipni/index-provider/engine" "github.com/ipni/index-provider/mirror" - "github.com/ipni/test/random" "github.com/multiformats/go-multihash" "github.com/stretchr/testify/require" ) diff --git a/server/admin/http/car_handler_test.go b/server/admin/http/car_handler_test.go index 2a649b3..1aa7ddb 100644 --- a/server/admin/http/car_handler_test.go +++ b/server/admin/http/car_handler_test.go @@ -14,12 +14,12 @@ import ( "github.com/ipfs/go-cid" "github.com/ipfs/go-datastore" dssync "github.com/ipfs/go-datastore/sync" + "github.com/ipfs/go-test/random" "github.com/ipni/go-libipni/metadata" provider "github.com/ipni/index-provider" "github.com/ipni/index-provider/cardatatransfer" mock_provider "github.com/ipni/index-provider/mock" "github.com/ipni/index-provider/supplier" - "github.com/ipni/test/random" "github.com/libp2p/go-libp2p/core/peer" "github.com/stretchr/testify/require" )