Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3
Commits
c98e2037
Commit
c98e2037
authored
Feb 15, 2017
by
Jeromy Johnson
Committed by
GitHub
Feb 15, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3691 from ipfs/kevina/pin-tests
Add tests for recursively pinning a dag (i.e. large file).
parents
24a32bf9
4b566ede
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
1 deletion
+33
-1
test/sharness/t0085-pins.sh
test/sharness/t0085-pins.sh
+33
-1
No files found.
test/sharness/t0085-pins.sh
View file @
c98e2037
...
@@ -39,14 +39,46 @@ test_pins() {
...
@@ -39,14 +39,46 @@ test_pins() {
'
'
}
}
test_pin_dag
()
{
EXTRA_ARGS
=
$1
test_expect_success
"'ipfs add
$EXTRA_ARGS
--pin=false' 1MB file"
'
random 1048576 56 > afile &&
HASH=`ipfs add $EXTRA_ARGS --pin=false -q afile`
'
test_expect_success
"'ipfs pin add' file"
'
ipfs pin add --recursive=true $HASH
'
test_expect_success
"'ipfs pin rm' file"
'
ipfs pin rm $HASH
'
test_expect_success
"remove part of the dag"
'
PART=`ipfs refs $HASH | head -1` &&
ipfs block rm $PART
'
test_expect_success
"pin file, should fail"
'
test_must_fail ipfs pin add --recursive=true $HASH 2> err &&
cat err &&
grep -q "not found" err
'
}
test_init_ipfs
test_init_ipfs
test_pins
test_pin_dag
test_pin_dag
--raw-leaves
test_launch_ipfs_daemon
--offline
test_launch_ipfs_daemon
--offline
test_pins
test_pins
test_pin_dag
test_pin_dag
--raw-leaves
test_kill_ipfs_daemon
test_kill_ipfs_daemon
test_done
test_done
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment