use go-libipfs/files instead of ipfs/go-ipfs-files
This commit is contained in:
parent
b77f2f09ab
commit
db6efe6512
2
go.mod
2
go.mod
@ -90,7 +90,6 @@ require (
|
||||
github.com/ipfs/go-ipfs-ds-help v1.1.0
|
||||
github.com/ipfs/go-ipfs-exchange-interface v0.2.0
|
||||
github.com/ipfs/go-ipfs-exchange-offline v0.3.0
|
||||
github.com/ipfs/go-ipfs-files v0.3.0
|
||||
github.com/ipfs/go-ipfs-http-client v0.5.0
|
||||
github.com/ipfs/go-ipfs-routing v0.3.0
|
||||
github.com/ipfs/go-ipfs-util v0.0.2
|
||||
@ -237,6 +236,7 @@ require (
|
||||
github.com/ipfs/go-filestore v1.2.0 // indirect
|
||||
github.com/ipfs/go-ipfs-cmds v0.8.2 // indirect
|
||||
github.com/ipfs/go-ipfs-delay v0.0.1 // indirect
|
||||
github.com/ipfs/go-ipfs-files v0.3.0 // indirect
|
||||
github.com/ipfs/go-ipfs-posinfo v0.0.1 // indirect
|
||||
github.com/ipfs/go-ipfs-pq v0.0.3 // indirect
|
||||
github.com/ipfs/go-ipld-legacy v0.1.1 // indirect
|
||||
|
@ -10,8 +10,8 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/ipfs/go-cid"
|
||||
files "github.com/ipfs/go-ipfs-files"
|
||||
ipld "github.com/ipfs/go-ipld-format"
|
||||
"github.com/ipfs/go-libipfs/files"
|
||||
dag "github.com/ipfs/go-merkledag"
|
||||
dstest "github.com/ipfs/go-merkledag/test"
|
||||
unixfile "github.com/ipfs/go-unixfs/file"
|
||||
|
@ -17,8 +17,8 @@ import (
|
||||
bstore "github.com/ipfs/go-ipfs-blockstore"
|
||||
chunk "github.com/ipfs/go-ipfs-chunker"
|
||||
offline "github.com/ipfs/go-ipfs-exchange-offline"
|
||||
files "github.com/ipfs/go-ipfs-files"
|
||||
ipldformat "github.com/ipfs/go-ipld-format"
|
||||
"github.com/ipfs/go-libipfs/files"
|
||||
"github.com/ipfs/go-merkledag"
|
||||
"github.com/ipfs/go-unixfs/importer/balanced"
|
||||
ihelper "github.com/ipfs/go-unixfs/importer/helpers"
|
||||
|
@ -13,8 +13,8 @@ import (
|
||||
bstore "github.com/ipfs/go-ipfs-blockstore"
|
||||
chunker "github.com/ipfs/go-ipfs-chunker"
|
||||
offline "github.com/ipfs/go-ipfs-exchange-offline"
|
||||
files "github.com/ipfs/go-ipfs-files"
|
||||
ipld "github.com/ipfs/go-ipld-format"
|
||||
"github.com/ipfs/go-libipfs/files"
|
||||
"github.com/ipfs/go-merkledag"
|
||||
"github.com/ipfs/go-unixfs/importer/balanced"
|
||||
ihelper "github.com/ipfs/go-unixfs/importer/helpers"
|
||||
|
@ -13,7 +13,7 @@ import (
|
||||
"github.com/ipfs/go-blockservice"
|
||||
"github.com/ipfs/go-cid"
|
||||
offline "github.com/ipfs/go-ipfs-exchange-offline"
|
||||
files "github.com/ipfs/go-ipfs-files"
|
||||
"github.com/ipfs/go-libipfs/files"
|
||||
"github.com/ipfs/go-merkledag"
|
||||
unixfile "github.com/ipfs/go-unixfs/file"
|
||||
carv2 "github.com/ipld/go-car/v2"
|
||||
@ -25,7 +25,7 @@ import (
|
||||
|
||||
// This test uses a full "dense" CARv2, and not a filestore (positional mapping).
|
||||
func TestRoundtripUnixFS_Dense(t *testing.T) {
|
||||
//stm: @CLIENT_DATA_IMPORT_002
|
||||
// stm: @CLIENT_DATA_IMPORT_002
|
||||
ctx := context.Background()
|
||||
|
||||
inputPath, inputContents := genInputFile(t)
|
||||
@ -74,7 +74,7 @@ func TestRoundtripUnixFS_Dense(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestRoundtripUnixFS_Filestore(t *testing.T) {
|
||||
//stm: @CLIENT_DATA_IMPORT_001
|
||||
// stm: @CLIENT_DATA_IMPORT_001
|
||||
ctx := context.Background()
|
||||
|
||||
inputPath, inputContents := genInputFile(t)
|
||||
|
@ -17,8 +17,8 @@ import (
|
||||
"github.com/ipfs/go-cid"
|
||||
bstore "github.com/ipfs/go-ipfs-blockstore"
|
||||
offline "github.com/ipfs/go-ipfs-exchange-offline"
|
||||
files "github.com/ipfs/go-ipfs-files"
|
||||
format "github.com/ipfs/go-ipld-format"
|
||||
"github.com/ipfs/go-libipfs/files"
|
||||
logging "github.com/ipfs/go-log/v2"
|
||||
"github.com/ipfs/go-merkledag"
|
||||
unixfile "github.com/ipfs/go-unixfs/file"
|
||||
|
@ -16,7 +16,7 @@ import (
|
||||
dssync "github.com/ipfs/go-datastore/sync"
|
||||
blockstore "github.com/ipfs/go-ipfs-blockstore"
|
||||
offline "github.com/ipfs/go-ipfs-exchange-offline"
|
||||
files "github.com/ipfs/go-ipfs-files"
|
||||
"github.com/ipfs/go-libipfs/files"
|
||||
"github.com/ipfs/go-merkledag"
|
||||
unixfile "github.com/ipfs/go-unixfs/file"
|
||||
"github.com/ipld/go-car"
|
||||
@ -32,7 +32,7 @@ import (
|
||||
var testdata embed.FS
|
||||
|
||||
func TestImportLocal(t *testing.T) {
|
||||
//stm: @CLIENT_STORAGE_DEALS_IMPORT_LOCAL_001, @CLIENT_RETRIEVAL_FIND_001
|
||||
// stm: @CLIENT_STORAGE_DEALS_IMPORT_LOCAL_001, @CLIENT_RETRIEVAL_FIND_001
|
||||
ds := dssync.MutexWrap(datastore.NewMapDatastore())
|
||||
dir := t.TempDir()
|
||||
im := imports.NewManager(ds, dir)
|
||||
@ -46,7 +46,7 @@ func TestImportLocal(t *testing.T) {
|
||||
b, err := testdata.ReadFile("testdata/payload.txt")
|
||||
require.NoError(t, err)
|
||||
|
||||
//stm: @CLIENT_STORAGE_DEALS_LIST_IMPORTS_001
|
||||
// stm: @CLIENT_STORAGE_DEALS_LIST_IMPORTS_001
|
||||
root, err := a.ClientImportLocal(ctx, bytes.NewReader(b))
|
||||
require.NoError(t, err)
|
||||
require.NotEqual(t, cid.Undef, root)
|
||||
@ -59,7 +59,7 @@ func TestImportLocal(t *testing.T) {
|
||||
require.Equal(t, root, *it.Root)
|
||||
require.True(t, strings.HasPrefix(it.CARPath, dir))
|
||||
|
||||
//stm: @CLIENT_DATA_HAS_LOCAL_001
|
||||
// stm: @CLIENT_DATA_HAS_LOCAL_001
|
||||
local, err := a.ClientHasLocal(ctx, root)
|
||||
require.NoError(t, err)
|
||||
require.True(t, local)
|
||||
|
Loading…
Reference in New Issue
Block a user