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
931cff2c
Commit
931cff2c
authored
Feb 08, 2015
by
Juan Batiz-Benet
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #764 from jbenet/use_multihash_not_shasum
Use multihash not shasum
parents
3e635e57
391b5a3c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
10 deletions
+14
-10
test/Makefile
test/Makefile
+5
-1
test/sharness/Makefile
test/sharness/Makefile
+1
-1
test/sharness/t0040-add-and-cat.sh
test/sharness/t0040-add-and-cat.sh
+8
-8
No files found.
test/Makefile
View file @
931cff2c
BINS
=
bin/random bin/ipfs
BINS
=
bin/random
bin/multihash
bin/ipfs
IPFS_ROOT
=
../
IPFS_CMD
=
../cmd/ipfs
RANDOM_SRC
=
../Godeps/_workspace/src/github.com/jbenet/go-random
MULTIHASH_SRC
=
../Godeps/_workspace/src/github.com/jbenet/go-multihash
all
:
deps
...
...
@@ -16,6 +17,9 @@ bins: $(BINS)
bin/random
:
$(RANDOM_SRC)/**/*.go
go build
-o
bin/random
$(RANDOM_SRC)
/random
bin/multihash
:
$(MULTIHASH_SRC)/**/*.go
go build
-o
bin/multihash
$(MULTIHASH_SRC)
/multihash
bin/ipfs
:
$(IPFS_ROOT)/**/*.go
go build
-o
bin/ipfs
$(IPFS_CMD)
...
...
test/sharness/Makefile
View file @
931cff2c
...
...
@@ -7,7 +7,7 @@
# NOTE: run with TEST_VERBOSE=1 for verbose sharness tests.
T
=
$(
sort
$(
wildcard
t[0-9][0-9][0-9][0-9]-
*
.sh
))
BINS
=
bin/random bin/ipfs
BINS
=
bin/random
bin/multihash
bin/ipfs
SHARNESS
=
lib/sharness/sharness.sh
IPFS_ROOT
=
../..
...
...
test/sharness/t0040-add-and-cat.sh
View file @
931cff2c
...
...
@@ -93,8 +93,8 @@ test_expect_success "generate 5MB file using go-random" '
'
test_expect_success
"sha1 of the file looks ok"
'
echo "5620fb92eb5a49c9986b5c6844efda37e471660e
mountdir/bigfile
" >sha1_expected &&
shasum
mountdir/bigfile >sha1_actual &&
echo "
1114
5620fb92eb5a49c9986b5c6844efda37e471660e" >sha1_expected &&
multihash -a=sha1 -e=hex
mountdir/bigfile >sha1_actual &&
test_cmp sha1_expected sha1_actual
'
...
...
@@ -128,8 +128,8 @@ test_expect_success EXPENSIVE "generate 100MB file using go-random" '
'
test_expect_success EXPENSIVE
"sha1 of the file looks ok"
'
echo "885b197b01e0f7ff584458dc236cb9477d2e736d
mountdir/bigfile
" >sha1_expected &&
shasum
mountdir/bigfile >sha1_actual &&
echo "
1114
885b197b01e0f7ff584458dc236cb9477d2e736d" >sha1_expected &&
multihash -a=sha1 -e=hex
mountdir/bigfile >sha1_actual &&
test_cmp sha1_expected sha1_actual
'
...
...
@@ -144,7 +144,7 @@ test_expect_success EXPENSIVE "ipfs add bigfile output looks good" '
'
test_expect_success EXPENSIVE
"ipfs cat succeeds"
'
ipfs cat $HASH |
shasum
>sha1_actual
ipfs cat $HASH |
multihash -a=sha1 -e=hex
>sha1_actual
'
test_expect_success EXPENSIVE
"ipfs cat output looks good"
'
...
...
@@ -152,13 +152,13 @@ test_expect_success EXPENSIVE "ipfs cat output looks good" '
test_cmp mountdir/bigfile actual
'
test_expect_success EXPENSIVE
"ipfs cat output
s
has
um
looks good"
'
echo "885b197b01e0f7ff584458dc236cb9477d2e736d
-
" >sha1_expected &&
test_expect_success EXPENSIVE
"ipfs cat output has
hed
looks good"
'
echo "
1114
885b197b01e0f7ff584458dc236cb9477d2e736d" >sha1_expected &&
test_cmp sha1_expected sha1_actual
'
test_expect_success FUSE,EXPENSIVE
"cat ipfs/bigfile succeeds"
'
cat ipfs/$HASH |
shasum
>sha1_actual
cat ipfs/$HASH |
multihash -a=sha1 -e=hex
>sha1_actual
'
test_expect_success FUSE,EXPENSIVE
"cat ipfs/bigfile looks good"
'
...
...
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