fix import test

This commit is contained in:
aarshkshah1992 2021-07-20 21:47:55 +05:30
parent 0c90868929
commit 13e845ae51

View File

@ -29,7 +29,7 @@ func TestImportNormalFileToUnixfsDAG(t *testing.T) {
defer os.Remove(carv2File) //nolint:errcheck defer os.Remove(carv2File) //nolint:errcheck
// import a normal file to a Unixfs DAG using a CARv2 read-write blockstore and flush it out to a CARv2 file. // import a normal file to a Unixfs DAG using a CARv2 read-write blockstore and flush it out to a CARv2 file.
tempCARv2Store, err := blockstore.NewReadWrite(carv2File, []cid.Cid{}) tempCARv2Store, err := blockstore.OpenReadWrite(carv2File, []cid.Cid{})
require.NoError(t, err) require.NoError(t, err)
bsvc := blockservice.New(tempCARv2Store, offline.Exchange(tempCARv2Store)) bsvc := blockservice.New(tempCARv2Store, offline.Exchange(tempCARv2Store))
root, err := importNormalFileToUnixfsDAG(ctx, inputPath, merkledag.NewDAGService(bsvc)) root, err := importNormalFileToUnixfsDAG(ctx, inputPath, merkledag.NewDAGService(bsvc))