t0040: use multihash instead of shasum in tests
License: MIT Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Christian Couder committed
Feb 8, 2015 at 13:32 UTC
391b5a3c8907138b847087aa9b8ba6f4ca8f4b45
1 file changed
+8
-8
test/sharness/t0040-add-and-cat.sh
+8
-8
@@ -93,8 +93,8 @@ test_expect_success "generate 5MB file using go-random" '
93
'
94
95
test_expect_success "sha1 of the file looks ok" '
96
- echo "5620fb92eb5a49c9986b5c6844efda37e471660e mountdir/bigfile" >sha1_expected &&
97
- shasum mountdir/bigfile >sha1_actual &&
96
+ echo "11145620fb92eb5a49c9986b5c6844efda37e471660e" >sha1_expected &&
97
+ multihash -a=sha1 -e=hex mountdir/bigfile >sha1_actual &&
98
test_cmp sha1_expected sha1_actual
99
'
100
@@ -128,8 +128,8 @@ test_expect_success EXPENSIVE "generate 100MB file using go-random" '
128
'
129
130
test_expect_success EXPENSIVE "sha1 of the file looks ok" '
131
- echo "885b197b01e0f7ff584458dc236cb9477d2e736d mountdir/bigfile" >sha1_expected &&
132
- shasum mountdir/bigfile >sha1_actual &&
131
+ echo "1114885b197b01e0f7ff584458dc236cb9477d2e736d" >sha1_expected &&
132
+ multihash -a=sha1 -e=hex mountdir/bigfile >sha1_actual &&
133
test_cmp sha1_expected sha1_actual
134
'
135
@@ -144,7 +144,7 @@ test_expect_success EXPENSIVE "ipfs add bigfile output looks good" '
144
'
145
146
test_expect_success EXPENSIVE "ipfs cat succeeds" '
147
- ipfs cat $HASH | shasum >sha1_actual
147
+ ipfs cat $HASH | multihash -a=sha1 -e=hex >sha1_actual
148
'
149
150
test_expect_success EXPENSIVE "ipfs cat output looks good" '
@@ -152,13 +152,13 @@ test_expect_success EXPENSIVE "ipfs cat output looks good" '
152
test_cmp mountdir/bigfile actual
153
'
154
155
-test_expect_success EXPENSIVE "ipfs cat output shasum looks good" '
156
- echo "885b197b01e0f7ff584458dc236cb9477d2e736d -" >sha1_expected &&
155
+test_expect_success EXPENSIVE "ipfs cat output hashed looks good" '
156
+ echo "1114885b197b01e0f7ff584458dc236cb9477d2e736d" >sha1_expected &&
157
test_cmp sha1_expected sha1_actual
158
'
159
160
test_expect_success FUSE,EXPENSIVE "cat ipfs/bigfile succeeds" '
161
- cat ipfs/$HASH | shasum >sha1_actual
161
+ cat ipfs/$HASH | multihash -a=sha1 -e=hex >sha1_actual
162
'
163
164
test_expect_success FUSE,EXPENSIVE "cat ipfs/bigfile looks good" '