mhchia
716c60ca6d
Reflect PR feedback
...
- Remove leftover `int` in `GossipsubParams`
- Remove default fields in tests
2019-08-01 21:38:14 +08:00
mhchia
4eb846be7c
Remove the assertions for connect
...
Because it fails in `test_security_multistream.py` and this check is
indeed not necessary inside `connect`.(Should probably be outside the
function.)
2019-08-01 13:30:09 +08:00
mhchia
c72dfe1dd3
Use factories and fixtures in pubsub tests
...
Done
- Add factories using factory-boy
- Modify fixtures and tests to use factories
- Modify tests to use fixtures and factories
- Clean up
2019-08-01 13:30:08 +08:00
Alex Stokes
0ae9840928
Run black
over repo
2019-07-31 15:00:12 -07:00
mhchia
ce369d47e9
Refine exception message
2019-07-31 16:23:07 +08:00
Kevin Mai-Husan Chia
c0e253a524
Update tests/pubsub/conftest.py
...
Co-Authored-By: NIC Lin <twedusuck@gmail.com>
2019-07-31 16:07:48 +08:00
Kevin Mai-Husan Chia
3bb63612a9
Update tests/pubsub/conftest.py
...
Co-Authored-By: NIC Lin <twedusuck@gmail.com>
2019-07-31 16:07:04 +08:00
mhchia
9683d5e8ac
Add tests for Pubsub
...
- `test_handle_subscription`
- `test_handle_talk`
- `test_message_all_peers`
2019-07-31 14:15:11 +08:00
mhchia
037b95252d
Add tests for Pubsub
...
- `test_get_hello_packet`
- `test_continuously_read_stream`
- `test_publish`
- `test_push_msg`
2019-07-31 14:15:10 +08:00
mhchia
550289a439
Combine test_subscription.py to test_pubsub.py
...
And add a bunch of tests for pubsub
2019-07-31 14:15:10 +08:00
mhchia
96563c0d84
Add fixtures for pubsub and router
...
And a starting `test_pubsub.py`
2019-07-31 14:14:13 +08:00
NIC619
f2de986c74
Add type hints to peer folder
2019-07-30 16:24:51 +08:00
mhchia
f02d38c0ee
Reflect PR feedback
...
* Rename `src` to `msg_forwarder` in pubsub/floodsub/gossipsub
* Rename Variables
* Sort imports
* Clean up
2019-07-29 12:09:35 +08:00
mhchia
c028aef2de
Fix all tests
...
- Dedup `perform_test_from_obj` and the test cases used in both
`test_floodsub` and `test_gossipsub_backward_compatibility.py`.
Therefore, they are put in the standalone file
`tests/pubsub/floodsub_integration_test_settings.py`. The functions
and testcases are imported from there then.
- IMO still need a refactor on the tests. There are still some duplicate
code.
2019-07-27 11:49:03 +08:00
mhchia
65aedcb25a
Fix several tests
2019-07-26 18:35:25 +08:00
mhchia
035d08b8bd
Fix test_floodsub.py
2019-07-25 23:11:27 +08:00
mhchia
dadcf8138e
Fix the tests according to pubsub.Publish
...
And refactored a bit.
2019-07-25 16:58:00 +08:00
mhchia
cae4f34034
Refactor floodsub.publish
...
Passed the first test of floodsub
2019-07-25 14:08:16 +08:00
NIC619
b0b4ddd0ca
Fix test_handle_prune
2019-07-24 11:35:14 +08:00
NIC619
99eabe49eb
Add handle_prune
test
2019-07-23 23:00:43 +08:00
NIC619
42093e40ec
Add handle_graft
test
2019-07-23 22:53:01 +08:00
NIC619
0cc8a205fb
Fix test and reduce number of nodes in test_join
2019-07-23 17:28:46 +08:00
NIC619
c0a3af69e0
Apply PR feedback:
...
Check that node is in mesh peer's mesh after subscribe
2019-07-23 16:45:54 +08:00
NIC Lin
042e0ac916
Update tests/pubsub/test_gossipsub.py
...
Co-Authored-By: Kevin Mai-Husan Chia <mhchia@users.noreply.github.com>
2019-07-23 16:37:41 +08:00
NIC Lin
3c3a9ac90b
Update tests/pubsub/test_gossipsub.py
...
Co-Authored-By: Kevin Mai-Husan Chia <mhchia@users.noreply.github.com>
2019-07-23 16:37:01 +08:00
NIC619
cdbeb63879
Add test
2019-07-22 19:28:12 +08:00
NIC619
14ee44c549
Lint test and add cleanup to the end
2019-07-21 23:16:42 +08:00
NIC619
2c1c8dc8cf
Add gossipsub.join
test
2019-07-21 23:16:41 +08:00
NIC619
a26c7783d6
Add one_to_all_connect
2019-07-21 23:14:08 +08:00
NIC Lin
1e78c21eca
Merge pull request #181 from NIC619/fix_handle_unsubscribe
...
Fix: handle unsubscribe message
2019-07-21 20:09:51 +08:00
mhchia
a2d1aadf25
Add test for checking p2p code
2019-07-20 22:43:32 +08:00
mhchia
d3eb68fa50
Increase coverage
2019-07-20 22:43:32 +08:00
mhchia
73125b99b0
Fix the error due to the breaking change
...
In multiaddr, `split` is moved to `Multiaddr`'s method.
2019-07-20 22:43:31 +08:00
NIC619
29aae7dca4
Add gossipsub join/leave test
2019-07-19 20:16:53 +08:00
NIC619
183eee0e85
Add self subscription tests
2019-07-18 13:39:22 +08:00
Stuckinaboot
a4529d827d
Modify peer_id str
2019-05-22 11:37:07 -04:00
Stuckinaboot
4b40339b63
Update peerid tests for longer peerids
2019-05-22 11:37:07 -04:00
ZX
49384ad3d7
Merge pull request #159 from libp2p/security-dev
...
Implement security
2019-05-07 09:56:19 -04:00
Robert Zajac
9052e8f8bd
The Gossipsub PR ( #162 )
...
* Add handle_rpc call to pubsub
* Scaffold gossipsub functions
* Add timer
* Implement most of mesh construction
* Implement emit and handle
* Implement fanout heartbeat
* Refactor emit
* some gossipsub cleanup and test
* minor lint stuff, more to come
* Implement publish
* Fix comment
* Modify pubsub/gossipsub so that floodsub tests pass using gossipsub router
* Add floodsub tests to gossipsub
* Handle case where select_from_minus, num_to_select > size(pool-minus)
* Add topic membership
* Implement handle ihave
* Implement most of iwant
* Add mcache.add and comments
* Refactor handle_ihave
* Implement stream write in handle_iwant
* Implement gossip heartbeat
* unresolved vars
* initial mcache code
* documenting mcache
* writing test/debugging mcache
* finished mcache test and debugged
* Make gossipsub backward compatibility its own file
* remove mcache prints
* DEBUGGING
* Add sender_peer_id to handle_rpc to get gossip test passing
* Modify gossipsub to make fanout work
* fanout maintenance test
* debugging gsub GOSSIP
* DEBUGGING
* debugged sender seen cachce
* adding lru, removing prints
* pylint cleanup
* Fix github comments in PR
* minor floodsub possible bugfix
2019-05-06 23:44:13 -04:00
Alex Haynes
eea6a9fda7
Merge pull request #157 from libp2p/router-refactor
...
Refactored RoutedHost into Injected Router
2019-05-05 14:45:22 -04:00
stuckinaboot
ff500e6d8e
Merge branch 'master' into security-dev
2019-05-01 17:26:23 -04:00
Stuckinaboot
144dc8d854
Move simple security to libp2p/security
2019-05-01 17:21:11 -04:00
Stuckinaboot
515a461172
Add more security tests
2019-05-01 17:13:01 -04:00
Stuckinaboot
4333c2d061
Fix linting issues'
2019-05-01 13:54:19 -04:00
Stuckinaboot
e555f17a7b
Fix bug in security multistream
2019-04-30 16:07:26 -04:00
Stuckinaboot
a0bd6e5eb0
Add simple security with communication test
2019-04-30 03:27:06 -04:00
Stuckinaboot
f59f27d4d0
Integrate security selectin into libp2p system
2019-04-30 03:09:05 -04:00
Stuckinaboot
999e64854c
Add security tests
2019-04-29 18:05:49 -04:00
zixuanzh
db7be2d561
add simple test
2019-04-28 17:57:57 -04:00
Alex Haynes
2efc0d3b5c
updated peerinfo encoding stored in DHT
2019-04-28 17:38:40 -04:00