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
52d6c402
Commit
52d6c402
authored
Nov 09, 2014
by
Juan Batiz-Benet
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #290 from chriscool/test_ipfs_block
Add test script for block command
parents
26510614
fc1a35e3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
+35
-0
test/t0050-block.sh
test/t0050-block.sh
+35
-0
No files found.
test/t0050-block.sh
0 → 100755
View file @
52d6c402
#!/bin/sh
#
# Copyright (c) 2014 Christian Couder
# MIT Licensed; see the LICENSE file in this repository.
#
test_description
=
"Test block command"
.
lib/test-lib.sh
test_expect_success
"ipfs init succeeds"
'
export IPFS_DIR="$(pwd)/.go-ipfs" &&
ipfs init
'
test_expect_success
"'ipfs block put' succeeds"
'
echo "Hello Mars!" >expected_in &&
ipfs block put <expected_in >actual_out
'
test_expect_success
"'ipfs block put' output looks good"
'
HASH="QmRKqGMAM6EZngbpjSqrvYzq5Qd8b1bSWymjSUY9zQSNDk" &&
echo "added as '
\'
'$HASH'
\'
'" >expected_out &&
test_cmp expected_out actual_out
'
test_expect_success
"'ipfs block get' succeeds"
'
ipfs block get $HASH >actual_in
'
test_expect_success
"'ipfs block get' output looks good"
'
test_cmp expected_in actual_in
'
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