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
c2142103
Commit
c2142103
authored
9 years ago
by
Jeromy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add some basic testing for object patch
parent
b4f55d33
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
test/sharness/t0051-object.sh
test/sharness/t0051-object.sh
+23
-0
No files found.
test/sharness/t0051-object.sh
View file @
c2142103
...
...
@@ -94,6 +94,29 @@ test_object_cmd() {
test_cmp expected_putBroken actual_putBroken &&
test_cmp expected_putBrokenErr actual_putBrokenErr
'
test_expect_success
"'ipfs object patch' should work"
'
EMPTY_DIR=$(ipfs object new unixfs-dir) &&
OUTPUT=$(ipfs object patch $EMPTY_DIR add-link foo $EMPTY_DIR)
'
test_expect_success
"should have created dir within a dir"
'
ipfs ls $OUTPUT > patched_output
'
test_expect_success
"output looks good"
'
echo "QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn 4 foo/ " > patched_exp &&
test_cmp patched_exp patched_output
'
test_expect_success
"can remove the directory"
'
ipfs object patch $OUTPUT rm-link foo > rmlink_output
'
test_expect_success
"output should be empty"
'
echo QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn > rmlink_exp &&
test_cmp rmlink_exp rmlink_output
'
}
# should work offline
...
...
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