@cryptotaxi247 / kubo / commits / 4cce6f8ad

add sharness test to check object stat with no leading /ipfs/

License: MIT Signed-off-by: Jeromy <jeromyj@gmail.com>

Jeromy committed Jul 14, 2015 at 12:28 UTC 4cce6f8adf44cb73c56b3dce7c408670a70e34dd
1 file changed +13
test/sharness/t0051-object.sh
+13
@@ -114,6 +114,19 @@ test_object_cmd() {
114 test_cmp hwfile hwfile_out
115 '
116
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 +
130 test_expect_success "should have created dir within a dir" '
131 ipfs ls $OUTPUT > patched_output
132 '