mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-27 13:27:50 +08:00
test swarm connect/disconnect
License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>
This commit is contained in:
parent
78f82e8e79
commit
98a1c44489
@ -97,4 +97,26 @@ test_expect_success "Addresses.NoAnnounce with /ipcidr affects addresses" '
|
||||
|
||||
test_kill_ipfs_daemon
|
||||
|
||||
test_expect_success "set up tcp testbed" '
|
||||
iptb init -n 2 -p 0 -f --bootstrap=none
|
||||
'
|
||||
|
||||
startup_cluster 2
|
||||
|
||||
test_expect_success "disconnect work without specifying a transport address" '
|
||||
[ $(ipfsi 0 swarm peers | wc -l) -eq 1 ] &&
|
||||
ipfsi 0 swarm disconnect "/ipfs/$(iptb get id 1)" &&
|
||||
[ $(ipfsi 0 swarm peers | wc -l) -eq 0 ]
|
||||
'
|
||||
|
||||
test_expect_success "connect work without specifying a transport address" '
|
||||
[ $(ipfsi 0 swarm peers | wc -l) -eq 0 ] &&
|
||||
ipfsi 0 swarm connect "/ipfs/$(iptb get id 1)" &&
|
||||
[ $(ipfsi 0 swarm peers | wc -l) -eq 1 ]
|
||||
'
|
||||
|
||||
test_expect_success "stopping cluster" '
|
||||
iptb stop
|
||||
'
|
||||
|
||||
test_done
|
||||
|
||||
Loading…
Reference in New Issue
Block a user