mirror of
https://github.com/ipfs/kubo.git
synced 2026-03-05 00:08:06 +08:00
Unixfs: enforce refs on files when using nocopy
License: MIT Signed-off-by: Łukasz Magiera <magik6k@gmail.com> This commit was moved from ipfs/interface-go-ipfs-core@3de10ba1bd This commit was moved from ipfs/boxo@089430e397
This commit is contained in:
parent
a437ea3e4e
commit
f590838d14
@ -16,6 +16,7 @@ import (
|
||||
"github.com/ipfs/go-ipfs/core/coreapi/interface/options"
|
||||
|
||||
"gx/ipfs/QmQXze9tG878pa4Euya4rrDpyTNX3kQe4dhCaBzBozGgpe/go-unixfs"
|
||||
"gx/ipfs/QmQXze9tG878pa4Euya4rrDpyTNX3kQe4dhCaBzBozGgpe/go-unixfs/importer/helpers"
|
||||
"gx/ipfs/QmR8BauakNcBa3RbE4nbQu76PDiJgoQgz8AJdhJuiU4TAw/go-cid"
|
||||
cbor "gx/ipfs/QmRoARq3nkUb13HSKZGepCZSWe5GrVPwx7xURJGZ7KWv9V/go-ipld-cbor"
|
||||
mdag "gx/ipfs/QmTQdH4848iTVCJmKXYyRiK72HufWTLYQQ8iN3JaQ8K1Hq/go-merkledag"
|
||||
@ -365,6 +366,13 @@ func (tp *provider) TestAdd(t *testing.T) {
|
||||
opts: []options.UnixfsAddOption{options.Unixfs.Nocopy(true), options.Unixfs.RawLeaves(false)},
|
||||
err: "nocopy option requires '--raw-leaves' to be enabled as well",
|
||||
},
|
||||
{
|
||||
name: "noCopyNoPath",
|
||||
data: strFile(helloStr),
|
||||
path: "/ipfs/zb2rhdhmJjJZs9qkhQCpCQ7VREFkqWw3h1r8utjVvQugwHPFd",
|
||||
opts: []options.UnixfsAddOption{options.Unixfs.Nocopy(true)},
|
||||
err: helpers.ErrMissingFsRef.Error(),
|
||||
},
|
||||
// Events / Progress
|
||||
{
|
||||
name: "simpleAddEvent",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user