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
60ad7a5a
Commit
60ad7a5a
authored
9 years ago
by
Jeromy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sharness tests for --only-hash
License: MIT Signed-off-by:
Jeromy
<
jeromyj@gmail.com
>
parent
e42c9672
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
0 deletions
+22
-0
test/sharness/t0040-add-and-cat.sh
test/sharness/t0040-add-and-cat.sh
+8
-0
test/sharness/t0041-add-cat-offline.sh
test/sharness/t0041-add-cat-offline.sh
+14
-0
No files found.
test/sharness/t0040-add-and-cat.sh
View file @
60ad7a5a
...
...
@@ -39,6 +39,14 @@ test_expect_success "ipfs add output looks good" '
test_cmp expected actual
'
test_expect_success
"ipfs add --only-hash succeeds"
'
ipfs add --only-hash mountdir/hello.txt > oh_actual
'
test_expect_success
"ipfs add --only-hash output looks good"
'
ipfs add --only-hash mountdir/hello.txt > oh_actual
'
test_expect_success
"ipfs cat succeeds"
'
ipfs cat "$HASH" >actual
'
...
...
This diff is collapsed.
Click to expand it.
test/sharness/t0041-add-cat-offline.sh
View file @
60ad7a5a
...
...
@@ -15,6 +15,20 @@ test_expect_success "ipfs add file succeeds" '
HASH=$(ipfs add -q afile)
'
test_expect_success
"ipfs add output looks good"
'
echo Qmb1EXrDyKhNWfvLPYK4do3M9nU7BuLAcbqBir6aUrDsRY > expected &&
echo $HASH > actual &&
test_cmp expected actual
'
test_expect_success
"ipfs add --only-hash succeeds"
'
ipfs add -q --only-hash afile > ho_output
'
test_expect_success
"ipfs add --only-hash output looks good"
'
test_cmp expected ho_output
'
test_expect_success
"ipfs cat file suceeds"
'
ipfs cat $HASH > out_1
'
...
...
This diff is collapsed.
Click to expand it.
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