Unverified 提交 25eeb1e2 作者: Whyrusleeping 提交者: GitHub

Merge pull request #4638 from MichaelMure/statlocal

add a --with-local option to ipfs files stat
......@@ -7,7 +7,6 @@ import (
oldcmds "github.com/ipfs/go-ipfs/commands"
dag "github.com/ipfs/go-ipfs/core/commands/dag"
e "github.com/ipfs/go-ipfs/core/commands/e"
files "github.com/ipfs/go-ipfs/core/commands/files"
ocmd "github.com/ipfs/go-ipfs/core/commands/object"
unixfs "github.com/ipfs/go-ipfs/core/commands/unixfs"
......@@ -109,6 +108,7 @@ var rootSubcommands = map[string]*cmds.Command{
"block": BlockCmd,
"cat": CatCmd,
"commands": CommandsDaemonCmd,
"files": FilesCmd,
"filestore": FileStoreCmd,
"get": GetCmd,
"pubsub": PubsubCmd,
......@@ -120,7 +120,6 @@ var rootSubcommands = map[string]*cmds.Command{
"dht": lgc.NewCommand(DhtCmd),
"diag": lgc.NewCommand(DiagCmd),
"dns": lgc.NewCommand(DNSCmd),
"files": lgc.NewCommand(files.FilesCmd),
"id": lgc.NewCommand(IDCmd),
"key": lgc.NewCommand(KeyCmd),
"log": lgc.NewCommand(LogCmd),
......
......@@ -154,6 +154,15 @@ test_files_api() {
ipfs files stat --hash / > roothash
'
test_expect_success "stat works outside of MFS" '
ipfs files stat /ipfs/$DIR1
'
test_expect_success "stat compute the locality of a dag" '
ipfs files stat --with-local /ipfs/$DIR1 > output
grep -q "(100.00%)" output
'
test_expect_success "cannot mkdir / $EXTRA" '
test_expect_code 1 ipfs files mkdir $ARGS /
'
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论