Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
schomatis committed Mar 21, 2022
1 parent 2027c02 commit 9a27cbe
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions test/sharness/t0040-add-and-cat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -348,20 +348,24 @@ test_add_cat_file() {

test_expect_success "ipfs add with multiple files of same name succeeds" '
mkdir -p mountdir/same-file/ &&
mkdir -p mountdir/hello2-content/ &&
cp mountdir/hello.txt mountdir/same-file/hello.txt &&
cp mountdir/hello2.txt mountdir/hello2-content/hello.txt &&
ipfs add mountdir/hello.txt mountdir/same-file/hello.txt mountdir/hello2-content/hello.txt >actual &&
rm mountdir/same-file/hello.txt mountdir/hello2-content/hello.txt &&
rmdir mountdir/same-file mountdir/hello2-content
ipfs add mountdir/hello.txt mountdir/same-file/hello.txt >actual &&
rm mountdir/same-file/hello.txt &&
rmdir mountdir/same-file
'

test_expect_success "ipfs add with multiple files of same name output looks good" '
echo "added QmVr26fY1tKyspEJBniVhqxQeEjhF78XerGiqWAwraVLQH hello.txt" >expected &&
echo "added QmVr26fY1tKyspEJBniVhqxQeEjhF78XerGiqWAwraVLQH hello.txt" >>expected &&
echo "added Qmf35k66MZNW2GijohUmXQEWKZU4cCGTCwK6idfnt152wJ hello.txt" >> expected &&
test_cmp expected actual
'

test_must_fail "ipfs add with multiple files of same name but different dirs fails" '
mkdir -p mountdir/same-file/ &&
cp mountdir/hello.txt mountdir/same-file/hello.txt &&
ipfs add mountdir/hello.txt mountdir/same-file/hello.txt >actual &&
rm mountdir/same-file/hello.txt &&
rmdir mountdir/same-file
'
}

test_add_cat_5MB() {
Expand Down

0 comments on commit 9a27cbe

Please sign in to comment.