Skip to content

Commit 4acb15d

Browse files
authoredMar 17, 2020
Merge pull request #6998 from ipfs/feat/fifo_support
Support pipes when named on the cli explicitly
2 parents ce7a449 + 705bee7 commit 4acb15d

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed
 

‎go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ require (
3030
github.com/ipfs/go-graphsync v0.0.5
3131
github.com/ipfs/go-ipfs-blockstore v0.1.4
3232
github.com/ipfs/go-ipfs-chunker v0.0.4
33-
github.com/ipfs/go-ipfs-cmds v0.1.1
33+
github.com/ipfs/go-ipfs-cmds v0.1.2
3434
github.com/ipfs/go-ipfs-config v0.2.1
3535
github.com/ipfs/go-ipfs-ds-help v0.1.1
3636
github.com/ipfs/go-ipfs-exchange-interface v0.0.1

‎go.sum

+4
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,10 @@ github.com/ipfs/go-ipfs-chunker v0.0.4 h1:nb2ZIgtOk0TxJ5KDBEk+sv6iqJTF/PHg6owN2x
270270
github.com/ipfs/go-ipfs-chunker v0.0.4/go.mod h1:jhgdF8vxRHycr00k13FM8Y0E+6BoalYeobXmUyTreP8=
271271
github.com/ipfs/go-ipfs-cmds v0.1.1 h1:H9/BLf5rcsULHMj/x8gC0e5o+raYhqk1OQsfzbGMNM4=
272272
github.com/ipfs/go-ipfs-cmds v0.1.1/go.mod h1:k1zMXcOLtljA9iAnZHddbH69yVm5+weRL0snmMD/rK0=
273+
github.com/ipfs/go-ipfs-cmds v0.1.2-0.20200316211807-0c2a21b0dacc h1:HIG2l6XUnov+M6UwcUKKrwGc8Q+n9AYGbiGM4pK21SM=
274+
github.com/ipfs/go-ipfs-cmds v0.1.2-0.20200316211807-0c2a21b0dacc/go.mod h1:a9LyFOtQCnVc3BvbAgW+GrMXEuN29aLCNi3Wk0IM8wo=
275+
github.com/ipfs/go-ipfs-cmds v0.1.2 h1:02FLzTA9jYRle/xdMWYwGwxu3gzC3GhPUaz35dH+FrY=
276+
github.com/ipfs/go-ipfs-cmds v0.1.2/go.mod h1:a9LyFOtQCnVc3BvbAgW+GrMXEuN29aLCNi3Wk0IM8wo=
273277
github.com/ipfs/go-ipfs-config v0.2.1 h1:Mpyvdf9Zc8k3jg+sRe8e9iylYXHYXqFMuePUjAZQvsE=
274278
github.com/ipfs/go-ipfs-config v0.2.1/go.mod h1:zCKH1uf1XIvf67589BnQ5IAv/Pld2J3gQoQYvG8TK8w=
275279
github.com/ipfs/go-ipfs-delay v0.0.0-20181109222059-70721b86a9a8/go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw=

‎test/sharness/t0040-add-and-cat.sh

+9-8
Original file line numberDiff line numberDiff line change
@@ -504,14 +504,15 @@ test_add_cat_expensive() {
504504
}
505505

506506
test_add_named_pipe() {
507-
test_expect_success "useful error message when adding a named pipe" '
508-
mkfifo named-pipe &&
509-
test_expect_code 1 ipfs add named-pipe 2>actual &&
510-
STAT=$(generic_stat named-pipe) &&
511-
rm named-pipe &&
512-
grep "Error: unrecognized file type for named-pipe: $STAT" actual &&
513-
grep USAGE actual &&
514-
grep "ipfs add" actual
507+
test_expect_success "Adding named pipes explicitly works" '
508+
mkfifo named-pipe1 &&
509+
( echo foo > named-pipe1 & echo "added $( echo foo | ipfs add -nq ) named-pipe1" > expected_named_pipes_add ) &&
510+
mkfifo named-pipe2 &&
511+
( echo bar > named-pipe2 & echo "added $( echo bar | ipfs add -nq ) named-pipe2" >> expected_named_pipes_add ) &&
512+
ipfs add -n named-pipe1 named-pipe2 >actual_pipe_add &&
513+
rm named-pipe1 &&
514+
rm named-pipe2 &&
515+
test_cmp expected_named_pipes_add actual_pipe_add
515516
'
516517

517518
test_expect_success "useful error message when recursively adding a named pipe" '

0 commit comments

Comments
 (0)
Please sign in to comment.