Skip to content

Commit

Permalink
test: meaningful t0025-datastores.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
lidel committed Oct 2, 2024
1 parent a868e08 commit e74de91
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions test/sharness/t0025-datastores.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,20 @@ test_description="Test non-standard datastores"

. lib/test-lib.sh

test_expect_success "'ipfs init --empty-repo=false --profile=pebbleds' succeeds" '
BITS="2048" &&
ipfs init --empty-repo=false --profile=pebbleds
'
profiles=("flatfs" "pebbleds" "badgerds")
proot="$(mktemp -d "${TMPDIR:-/tmp}/t0025.XXXXXX")"

test_expect_success "'ipfs pin ls' works" '
ipfs pin ls | wc -l | grep 9
'
for profile in "${profiles[@]}"; do
test_expect_success "'ipfs init --empty-repo=false --profile=$profile' succeeds" '
BITS="2048" &&
IPFS_PATH="$proot/$profile" &&
ipfs init --empty-repo=false --profile=$profile
'
test_expect_success "'ipfs pin add' and 'pin ls' works with $profile" '
export IPFS_PATH="$proot/$profile" &&
echo -n "hello_$profile" | ipfs block put --pin=true > hello_cid &&
ipfs pin ls -t recursive "$(cat hello_cid)"
'
done

test_done

0 comments on commit e74de91

Please sign in to comment.