Skip to content

Commit 4cce6f8

Browse files
committedJul 14, 2015
add sharness test to check object stat with no leading /ipfs/
License: MIT Signed-off-by: Jeromy <jeromyj@gmail.com>
1 parent 839759a commit 4cce6f8

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
 

‎test/sharness/t0051-object.sh

+13
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,19 @@ test_object_cmd() {
114114
test_cmp hwfile hwfile_out
115115
'
116116

117+
test_expect_success "ipfs object stat path succeeds" '
118+
ipfs object stat $(cat multi_patch)/a/b/c > obj_stat_out
119+
'
120+
121+
test_expect_success "ipfs object stat output looks good" '
122+
echo NumLinks: 0 > obj_stat_exp &&
123+
echo BlockSize: 20 >> obj_stat_exp &&
124+
echo LinksSize: 2 >> obj_stat_exp &&
125+
echo DataSize: 18 >> obj_stat_exp &&
126+
echo CumulativeSize: 20 >> obj_stat_exp &&
127+
test_cmp obj_stat_out obj_stat_exp
128+
'
129+
117130
test_expect_success "should have created dir within a dir" '
118131
ipfs ls $OUTPUT > patched_output
119132
'

0 commit comments

Comments
 (0)
Please sign in to comment.