Skip to content

Commit

Permalink
Adder: Test that each file on the command line is pinned individually
Browse files Browse the repository at this point in the history
Add (currently failing and marked as such) test that each file
specified on the command line is pinned individually when using
"ipfs add".

License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
  • Loading branch information
kevina committed Sep 30, 2016
1 parent 300187a commit 551f540
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions test/sharness/t0046-multifile-add.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/sh
#
# Copyright (c) 2014 Christian Couder
# MIT Licensed; see the LICENSE file in this repository.
#

test_description="Test add and cat commands"

. lib/test-lib.sh

test_init_ipfs

test_expect_success "create some files" '
echo A > fileA &&
echo B > fileB &&
echo C > fileC
'

test_expect_success "add files all at once" '
ipfs add -q fileA fileB fileC > hashes
'

test_expect_failure "unpin one of the files" '
ipfs pin rm `head -1 hashes` > pin-out
'

test_expect_failure "unpin output looks good" '
echo "unpinned `head -1 hashes`" > pin-expect
test_cmp pin-expect pin-out
'


test_done

0 comments on commit 551f540

Please sign in to comment.