Commit Graph

126 Commits

Author SHA1 Message Date
Addy Bryant
3fcf7fa567 feat(test): added additional context on why test could fail 2022-04-01 16:53:12 +03:00
Joonas Koivunen
50ad10fc4c test(pubsub): simplify, comment
simplify away the use of hashset's for messages along with any
filtering, instead simply assert that who witnessed what message and
include the sent message in the assertion as well.

comment as in use less broad technical names and more context specific
names.

also removes some of the duplicate comments.
2022-04-01 13:21:26 +03:00
Joonas Koivunen
277954b0d2 test(pubsub): disjoint topics as new test case
originally created in 8eae8e1fc119a6a1f5261c2f21b2ac3d0a7898f2 by
altering the single topic test, included in this commit as duplicating
version.

Co-authored-by: Addy Bryant <rand0m-cloud@outlook.com>
2022-04-01 13:19:29 +03:00
Addy Bryant
72ff95dca0 fix(swarm): corrected dial failure logic 2022-04-01 12:11:40 +03:00
bors[bot]
2c540928c0
Merge #454
454: Fix connecting to peers r=koivunej a=koivunej

The correct way to connect to a peer is in my understanding to DialPeer and then proceed to give the address of that said peer from `NetworkBehaviour::addresses_of_peer`. While doing this, the previous workaround for missing events from banning a peer (the way we force a disconnect) was also necessary to fix.

Co-authored-by: Joonas Koivunen <joonas.koivunen@gmail.com>
2021-01-28 12:21:55 +00:00
Joonas Koivunen
d8a282eb65 test: split off common_tests from common 2021-01-28 08:53:16 +02:00
Joonas Koivunen
22e7b6cb76 test(connectivity): connecting to wrong peerid 2021-01-27 19:04:32 +02:00
Joonas Koivunen
dc0c6a0af0 chore: tokio::test is now single-threaded 2021-01-25 13:48:30 +02:00
Joonas Koivunen
ffd043c618 chore: clippy 2021-01-25 11:48:57 +02:00
ljedrz
bc0379402b chore: post-update tweaks
Signed-off-by: ljedrz <ljedrz@gmail.com>
2021-01-18 16:56:36 +02:00
ljedrz
7e51079010 chore: update tokio to 0.3
Signed-off-by: ljedrz <ljedrz@gmail.com>
2021-01-18 16:56:36 +02:00
Joonas Koivunen
3afbd47f0d chore: remove noop use stmt 2021-01-04 10:55:07 +02:00
Niklas Long
bf3ad6113d ci: update go-ipfs to 0.7.0 in interop tests
This also removes the --bits arg as go-ipfs now uses ed25519 keys
instead of 2048 bit RSA by default.
2020-11-09 13:00:12 +01:00
Joonas Koivunen
9d2f03e805 refactor: reproduce issue with dht_popular_content_discovery
using the ipfs.restore_bootstrappers() should probably be the default
way in order to set the default bootstrappers.
2020-10-07 13:45:07 +03:00
ljedrz
fe7915d0f4 test: add unit tests for the Node topologies
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-16 14:48:51 +02:00
ljedrz
7e0114d894 test: extend block_exchange tests
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-16 14:48:51 +02:00
ljedrz
f15eef1fe2 test: rename exchange_block to block_exchange
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-16 14:48:51 +02:00
ljedrz
fd254520d2 test: compact the connectivity tests, reduce their timeout
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-16 14:48:51 +02:00
ljedrz
a5efe1b499 fix: strip the PeerId from addrs passed to Ipfs::add_address
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-16 14:48:51 +02:00
ljedrz
e1eae41ab0 test: shorten dht::find_peer_local
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-16 14:48:51 +02:00
ljedrz
31d6582d8a chore: rename start_nodes_in_chain to spawn_bootstrapped_nodes
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-15 16:32:51 +02:00
ljedrz
386d4c09a0 refactor: make the DHT tests more compact
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-15 16:32:51 +02:00
ljedrz
c5eca0e3ef feat: rename spawn_connected_nodes to spawn_nodes and add a somewhat obvious Topology::None
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-15 16:32:51 +02:00
ljedrz
46fc6a1eea test: add a pubsub interop test
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-11 17:12:09 +02:00
ljedrz
f9eff3490d test: make ForeignNode::api_call a free function
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-11 14:47:38 +02:00
ljedrz
07dfdbe6cc test: enable pubsub in ForeignNode
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-11 14:20:52 +02:00
ljedrz
42630cc5e2 test: add ForeignNode::api_call
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-11 14:02:13 +02:00
ljedrz
aea5b2b3fd test: include the API port in the ForeignNode
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-11 13:37:39 +02:00
ljedrz
d9bebb9a74 test: include the binary path in the ForeignNode
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-11 12:04:40 +02:00
ljedrz
f758504d05 fix: remove the CI dead_code warnings
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-11 10:55:49 +02:00
ljedrz
8c545c622d chore: move address-related helpers and tests from lib to p2p::addr
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-10 12:39:43 +02:00
ljedrz
e4ee04cf08 test: move a listening_addr test from lib to tests::listening_addrs
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-10 12:39:43 +02:00
ljedrz
b0ad07d914 test: rename tests::multiple_listening_addresses to ::listening_addresses
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-10 12:21:09 +02:00
ljedrz
712ba1ee7f test: rename tests::connect_two to ::connectivity
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-10 12:16:52 +02:00
ljedrz
a646228b2a test: move bitswap tests to a single file
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-10 12:15:34 +02:00
ljedrz
275959e301 test: add Topology::Star and use it 2020-09-09 17:11:38 +02:00
ljedrz
cdc07e93c6 test: generalize two_connected_nodes to spawn_connected_nodes and use it more
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-09 16:34:28 +02:00
ljedrz
5fb4ba0aca test: move two_connected_nodes to tests::common and use it in more places
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-09 14:41:08 +02:00
ljedrz
4ee37b30f0 test: annotate a test object with allow(dead_code)
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-09 14:39:54 +02:00
ljedrz
ee7a70e90e refactor: simplify interop imports
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-08 11:38:16 +02:00
ljedrz
b52e413304 test: enable easy foreign node interop for many tests by adding ForeignNode::identity
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-08 11:18:26 +02:00
ljedrz
22208295cc test: introduce jsipfs interop test feature
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-08 10:51:35 +02:00
ljedrz
0e3afd4382 chore: move the interop objects into separate modules
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-07 17:14:41 +02:00
ljedrz
b545c4022b chore: rename the go-ipfs node objects to sound more general
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-07 17:14:41 +02:00
ljedrz
70b1c735e7 chore: rename test_dht_with_go to test_go_interop
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-07 17:14:41 +02:00
ljedrz
5628024208 test: introduce tests/common and move go interop there
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-07 17:14:41 +02:00
ljedrz
01054345b1 refactor: expose kad::Quorum in the IPFS::dht_{get, put} API
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-02 12:17:45 +02:00
ljedrz
69ccbb9cb1 feat: add dht get and put
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-02 09:29:26 +02:00
ljedrz
77237a5559 chore: extra post-review comment and a panic message grammatical fix
Co-authored-by: Joonas Koivunen <joonas@equilibrium.co>
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-01 17:31:06 +02:00
ljedrz
11dba5a44e fix: make the go-ipfs DHT interop tests pass together
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-09-01 14:07:59 +02:00