Skip to content

Commit

Permalink
Checks explicitly for common put/findprovs peers.
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
  • Loading branch information
hackergrrl authored and Stephen Whitmore committed Apr 23, 2016
1 parent d9c4aff commit 26d961f
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions test/sharness/t0170-dht.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,15 @@ test_expect_success 'findpeer' '

# ipfs dht put <key> <value>
test_expect_success 'put' '
ipfsi 1 dht put planet pluto >actual &&
PEERS=$(wc -l actual | cut -d '"'"' '"'"' -f 1) &&
[ -s actual ] ||
test_fsh cat actual
ipfsi 1 dht put planet pluto | sort >putted &&
[ -s putted ] ||
test_fsh cat putted
'

# ipfs dht findprovs <key>
test_expect_success 'findprovs' '
ipfsi 4 dht findprovs planet >actual &&
PEERS=$(wc -l actual | cut -d '"'"' '"'"' -f 1) &&
ipfsi 4 dht findprovs planet | sort >provs &&
sort provs putted | uniq -d >actual &&
[ -s actual ] ||
test_fsh cat actual
'
Expand Down

0 comments on commit 26d961f

Please sign in to comment.