Skip to content

Commit 8885034

Browse files
committed
explicitly add buggy path clean refs
1 parent 7b724a7 commit 8885034

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

sharness/t0080-three-to-four.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,16 +244,32 @@ test_expect_success "pin some objects directly" '
244244
pin_hashes directpins "-r=false"
245245
'
246246

247+
test_expect_success "add some files with the path clean bug" '
248+
printf ba | ipfs add -q > buggy_hashes &&
249+
printf bbd | ipfs add -q >> buggy_hashes &&
250+
printf cdbd | ipfs add -q >> buggy_hashes &&
251+
printf aabdb | ipfs add -q >> buggy_hashes &&
252+
printf bccac | ipfs add -q >> buggy_hashes &&
253+
sort buggy_hashes -o buggy_hashes
254+
255+
'
256+
247257
test_expect_success "get full ref list" '
248258
ipfs refs local | sort > start_refs
249259
'
250260

261+
test_expect_success "ensure buggy hashes dont show up in ref list" '
262+
comm -12 start_refs buggy_hashes > badrefs &&
263+
test ! -s badrefs
264+
'
265+
251266
test_expect_success "get pin lists" '
252267
ipfs pin ls --type=recursive | sort > start_rec_pins &&
253268
ipfs pin ls --type=direct | sort > start_dir_pins &&
254269
ipfs pin ls --type=indirect | sort > start_ind_pins
255270
'
256271

272+
257273
test_kill_ipfs_daemon
258274

259275
test_install_ipfs_nd "v0.4.3-dev"

0 commit comments

Comments
 (0)