Skip to content

Commit

Permalink
Merge pull request #696 from ipfs/fix/compose
Browse files Browse the repository at this point in the history
Fix docker-compose testing
  • Loading branch information
hsanjuan committed Mar 4, 2019
2 parents 20a67cc + 8a1bd1c commit 1c9c919
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ clean: rwundo clean_sharness
$(MAKE) -C cmd/ipfs-cluster-service clean
$(MAKE) -C cmd/ipfs-cluster-ctl clean
@rm -rf ./test/testingData
@rm -rf ./compose

install: deps
$(MAKE) -C cmd/ipfs-cluster-service install
Expand Down Expand Up @@ -95,6 +96,8 @@ docker:


docker-compose:
mkdir -p compose/ipfs0 compose/ipfs1 compose/cluster0 compose/cluster1
chmod -R 0777 compose
CLUSTER_SECRET=$(shell od -vN 32 -An -tx1 /dev/urandom | tr -d ' \n') docker-compose up -d
sleep 20
docker exec cluster0 ipfs-cluster-ctl peers ls | grep -o "Sees 1 other peers" | uniq -c | grep 2
Expand Down
2 changes: 1 addition & 1 deletion sharness/t0030-ctl-pin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ test_expect_success IPFS,CLUSTER "wait for data to unpin from cluster with ctl w
ipfs-cluster-ctl status "$cid" | grep -q -i "UNPINNED"
'

cid=(`docker exec ipfs sh -c "mkdir -p test1/test2 && touch test1/test2/test3.txt && ipfs add -qr test1"`)
cid=(`docker exec ipfs sh -c "mkdir -p /tmp/test1/test2 && touch /tmp/test1/test2/test3.txt && ipfs add -qr /tmp/test1"`)

test_expect_success IPFS,CLUSTER "pin data to cluster with ctl using ipfs paths" '
ipfs-cluster-ctl pin add "/ipfs/${cid[2]}/test2/test3.txt" &&
Expand Down

0 comments on commit 1c9c919

Please sign in to comment.