NIC Lin
da10fc8531
Merge pull request #360 from NIC619/store_our_keypair_in_peerstore
...
Store our keypair in peerstore
2019-11-27 17:14:36 +08:00
Jason Carver
d589daf00d
Fill in template variables
2019-11-26 13:33:57 -08:00
Jason Carver
d1b5a56ccf
Match linting rules after merging in template
2019-11-26 13:33:08 -08:00
Jason Carver
27da312285
Splice in project template
...
I tried to merge it so that future updates from the template will be
much easier.
The template is hosted at:
https://github.com/ethereum/ethereum-python-project-template
2019-11-26 13:30:41 -08:00
mhchia
ec43c25b45
Rewrite factories, made some of the test running
2019-11-26 19:24:30 +08:00
Chih Cheng Liang
a397ccdc04
makes test_mplex_stream.py::test_mplex_stream_read_write work
2019-11-26 15:27:06 +08:00
Chih Cheng Liang
c55ea0e5bb
implement trio queue interface
2019-11-26 15:27:05 +08:00
Chih Cheng Liang
41ff884eef
rewrite tcp reader/writer interface
2019-11-26 15:27:05 +08:00
NIC619
94c7a0bca4
Apply PR feedback and fix
2019-11-26 14:04:28 +08:00
NIC619
076dae50f3
Fix missing BasicHost
interface update
2019-11-25 22:05:33 +08:00
Chih Cheng Liang
bcd7890124
Move test utilities to tools ( #356 )
...
* move test factories to libp2p/tools
* remove unused inits
* move pubsub test utils to tools
* cleanup test_interop
* fix typing libp2p/tools/utils
* add typing to pubsub utils
* fix factories typing
* fix typing for floodsub_integration_test_settings
* fix rest of the typing
* fix isort
2019-11-21 11:47:54 +08:00
Alex Stokes
29873584dc
update test for identify and ping using new test fixture via PR feedback
2019-11-07 21:11:35 -08:00
Alex Stokes
30dee28ef2
add asynccontextmanager utility for a pair of connected hosts
2019-11-07 20:59:01 -08:00
Alex Stokes
9c05e2b0bb
add basic test for identify
2019-11-07 08:05:39 -08:00
Alex Stokes
e61a5a677f
clean up tests w/ default protocols in place
2019-11-07 07:51:44 -08:00
mhchia
10dd997805
Reorganize factories
2019-11-06 12:11:09 -08:00
Alex Stokes
a07c3b0fb0
modify factories to fix tests
2019-11-06 12:11:01 -08:00
Alex Stokes
3deccac2da
fix tests
2019-11-06 12:10:58 -08:00
Alex Stokes
fbdd52cfdc
Go with immutable datatype in lieu of mutable datatype
2019-11-06 11:25:12 -08:00
Alex Stokes
c8a5f6f8d7
Run docformatter
over changes
2019-11-05 17:50:11 -08:00
Alex Stokes
94984be4df
Avoid hard-coding ports where it is not relevant for Kademlia tests
2019-11-05 17:50:11 -08:00
Alex Stokes
700209c50a
Merge pull request #315 from ralexstokes/add-ping-protocol
...
Add `ping` protocol.
2019-11-06 10:14:39 +09:00
Piper Merriam
ded3792924
Merge pull request #331 from dmuhs/fix/docs-format
...
Add automatic docstring formatting
2019-10-28 09:39:52 -06:00
Dominik Muhs
bafdd8512d
Enforce pre-summary newline in docstrings
2019-10-24 20:10:45 +02:00
Dominik Muhs
714126faf5
Update secio tests to new initiator flag
2019-10-24 19:30:57 +02:00
Dominik Muhs
c0452c961b
Update stream muxer conftest
2019-10-24 19:25:51 +02:00
Alex Stokes
d795a9b854
Add tests for ping
protocol
2019-10-24 19:53:04 +09:00
Alex Stokes
1bf0c31d1f
add basic test for default protocols
2019-10-24 17:36:34 +09:00
Dominik Muhs
2af97240c5
Fix import formatting
2019-10-24 09:16:58 +02:00
Dominik Muhs
eef505f2d9
Add automatic docstring formatter and apply
2019-10-24 08:41:10 +02:00
Aratz M. Lasa
ac9feef26c
Pull request feedback
2019-10-15 20:32:25 +02:00
Aratz M. Lasa
d1d91e4091
Refactored for 'lint' testenv
2019-10-15 19:02:03 +02:00
Aratz M. Lasa
8143563831
Added tests for 'RoutedHost' and modified 'FindPeer'
2019-10-15 01:01:16 +02:00
Alex Stokes
673ce40133
Add basic tests for ed25519 keys
2019-09-24 10:06:35 -07:00
mhchia
da34b086d5
Merge branch 'master' into fix/change-notifee-and-add-tests-for-swarm-conn-and-mplex
2019-09-24 13:50:54 +08:00
mhchia
006002f687
Move interop tests out of tests
...
It is moved to the top level package `tests_interop`, to avoid circular
dependency, with the dependency moved to `tox`.
2019-09-23 22:00:40 +08:00
mhchia
95ae718e3d
Raise ParseError
in read_delim
2019-09-23 16:01:22 +08:00
mhchia
92deae41dc
Change SwarmConn.conn
to muxed_conn
2019-09-23 15:46:50 +08:00
mhchia
6f8394e4bd
Merge branch 'master' into fix/change-notifee-and-add-tests-for-swarm-conn-and-mplex
2019-09-21 18:34:12 +08:00
mhchia
e44c2145cc
Merge branch 'master' into fix/detection-of-close
2019-09-21 18:05:54 +08:00
mhchia
a27a817d50
Fix tests
2019-09-20 16:17:13 +08:00
mhchia
89c127eff4
Merge branch 'master' into fix/refactor-mplex-swarm-host
2019-09-20 15:45:28 +08:00
mhchia
313ae45b45
Add tests for MplexStream
2019-09-19 16:31:42 +08:00
mhchia
02c55e5d14
Add tests for MplexConn
2019-09-19 16:31:42 +08:00
mhchia
a9ad37bc6f
Add mplex tests and fix error in SwarmConn.close
2019-09-19 16:31:41 +08:00
mhchia
d61327f5f9
Add tests for SwarmConn
2019-09-19 16:31:41 +08:00
mhchia
b8b5ac5e06
Add test for notifee disconnected
2019-09-19 16:31:41 +08:00
mhchia
675c61ce3b
Move test_notify from libp2p to network
2019-09-19 16:31:41 +08:00
mhchia
5307c0506b
Change IMuxedConn
to INetConn
in Notifee
2019-09-19 16:31:41 +08:00
mhchia
0356380996
Add tests for swarm, and debug
...
Fix `swarm_pair_factory`
2019-09-19 16:31:40 +08:00
mhchia
276ac4d8ab
Add initial test for Swarm.close_peer
2019-09-19 16:31:13 +08:00
mhchia
e7304538da
Add test for Swarm.close_peer
2019-09-19 16:31:12 +08:00
mhchia
2d8e02b7eb
Add detection for disconnections in mplex
2019-09-19 15:55:26 +08:00
mhchia
0c7afeebaf
Fix test_security_multistream
2019-09-19 13:59:50 +08:00
NIC619
7243eb9766
Fix different exception raised in test
2019-09-17 21:44:48 +08:00
mhchia
df87f5adb9
Add tests against the daemon for close/reset
2019-09-10 18:01:16 +08:00
mhchia
bb0da41eda
Remove cleanup
...
`cleanup` cancels all tasks in the loop, including the main one run by
`run_until_complete`
2019-09-10 18:01:16 +08:00
mhchia
a45eb76421
Suppress all exceptions in clean up.
2019-09-10 18:01:16 +08:00
mhchia
df312f3e57
Fix linting
2019-09-10 18:01:15 +08:00
mhchia
0ab548aee5
Add the missing tests
2019-09-10 18:01:15 +08:00
mhchia
be2c0f122a
Fix close behavior
2019-09-10 18:01:14 +08:00
mhchia
6c1f77dc1a
Fix: Change the event.close
to event.set
...
And add missing parts.
2019-09-06 21:35:15 +08:00
mhchia
a754e7dbbe
Add the missing tests.constants
2019-09-06 17:59:39 +08:00
mhchia
649a230776
Fix MplexStream.read
2019-09-06 17:26:40 +08:00
Alex Stokes
6d97702da7
Merge pull request #277 from ralexstokes/add-io-abstractions
...
Introduces IO abstractions and classes for `msgio` IO
2019-09-04 19:11:50 +02:00
mhchia
1f3c9af45b
Add the missing is_proc_running=True
2019-09-04 22:19:11 +08:00
mhchia
0e3d4508d6
PR feedback
...
- Use `Sequence` instead of `List`
- Add note
- Remove redundant words in docstring
2019-09-04 20:52:18 +08:00
mhchia
db0da8083a
Do p2pd.close
if not all of them succeed
2019-09-04 20:52:17 +08:00
Kevin Mai-Husan Chia
51d547ccc5
Update tests/interop/utils.py
...
Co-Authored-By: NIC Lin <twedusuck@gmail.com>
2019-09-04 20:38:38 +08:00
Kevin Mai-Husan Chia
b72c489f4e
Update tests/interop/daemon.py
...
Co-Authored-By: NIC Lin <twedusuck@gmail.com>
2019-09-04 20:36:42 +08:00
Kevin Mai-Husan Chia
a843514afb
Update tests/interop/daemon.py
...
Co-Authored-By: NIC Lin <twedusuck@gmail.com>
2019-09-04 20:35:42 +08:00
Kevin Mai-Husan Chia
155f523c9f
Update tests/interop/daemon.py
...
Co-Authored-By: NIC Lin <twedusuck@gmail.com>
2019-09-04 20:33:50 +08:00
Kevin Mai-Husan Chia
bd21b2f66f
Update tests/interop/conftest.py
...
Co-Authored-By: NIC Lin <twedusuck@gmail.com>
2019-09-04 20:33:29 +08:00
mhchia
dddaacad62
Move install script under tests/interop/go_pkgs
2019-09-04 16:33:25 +08:00
mhchia
677531db76
Fix pubsub tests
2019-09-04 15:33:07 +08:00
Alex Stokes
8e8318aa5c
Introduces IO abstractions apart from asyncio
or those attached to IRawConnection
...
Also adds `msgio` utilities to mirror the Go implementation
2019-09-03 21:59:50 -07:00
mhchia
7f20ab781d
Fix gosssipsub tests
2019-09-03 23:37:34 +08:00
mhchia
5280f3965c
Update install script for interop
...
And adjust the structure of go packages for interop
2019-09-03 17:41:17 +08:00
mhchia
749ff275ed
Refactor make_p2pd
...
Let `make_p2pd` get rid of `unused_tcp_port_factory`, which should only
exist in fixtures/tests.
2019-09-03 16:55:42 +08:00
mhchia
7385a7a677
Add is_gossipsub
fixture in interop test
...
To use the same code to test against both routers: floodsub and
gossipsub.
2019-09-03 16:49:00 +08:00
mhchia
33dae87c35
Add pubsub test for gossipsub
2019-09-03 16:07:44 +08:00
mhchia
194b494057
Tested against subscriptions and publish
2019-09-02 23:21:57 +08:00
mhchia
3717dc9adf
Add helper functions
2019-09-02 21:01:13 +08:00
mhchia
a883816881
Add connect
utility function
2019-09-02 18:40:12 +08:00
mhchia
56ef0b962c
Add test for host
connect
and disconnect
2019-09-02 17:32:15 +08:00
mhchia
dfd9ebdc5e
Change PeerInfo
to remove dep on PeerData
2019-09-02 14:30:27 +08:00
mhchia
b77834d129
Use asyncio.subprocess
over pexpect
...
In the test for pubsub, since there were unknown issues when I test
against pexpect.
2019-09-02 14:30:27 +08:00
mhchia
1b5d064a8d
Add utility functions for libp2p bindings
...
To prepare for pubsub interop test
2019-09-02 14:30:25 +08:00
mhchia
b955c0fa02
Explicitly import ID, Transport from secio
2019-08-31 22:38:46 +08:00
Kevin Mai-Husan Chia
9e8a6bdf29
Update tests/conftest.py
...
Co-Authored-By: NIC Lin <twedusuck@gmail.com>
2019-08-31 22:32:43 +08:00
mhchia
cec2aea928
Move shared fixtures and constants to files
2019-08-29 22:38:08 +08:00
mhchia
9ceb5f55bb
Call make_echo_proc
with is_host_insecure
...
Use the fixture, this way we can configure `is_host_insecure` to support
the test against secio.
2019-08-29 22:08:27 +08:00
mhchia
c61a06706a
Refactor interop tests and factories
...
- Add `close` and `disconnect` in `Host`
- Add `close` and `close_peer` in `Network`
- Change `IListener.close` to async, to await for server's closing
- Add factories for security transports, and modify `HostFactory`
2019-08-29 21:38:06 +08:00
mhchia
64c0dab3af
Fix isort
2019-08-29 00:01:48 +08:00
mhchia
b726d7c9da
Add tox and CI for interop
2019-08-28 23:39:33 +08:00
mhchia
d35b8ffc64
Conform stream_id
to go-mplex
2019-08-28 21:43:34 +08:00
Alex Stokes
66c3bacf7e
Merge pull request #254 from ralexstokes/implement-secio
...
Implement `secio`
2019-08-26 19:22:00 +02:00
Alex Stokes
fa0acd9fc5
Apply PR feedback
2019-08-26 10:03:12 -07:00
NIC619
5e68aff1d1
Fix conn
attribute and docstring in mplex
2019-08-25 14:42:44 +08:00
Alex Stokes
f08aa339b4
Verify the channel can pass some plaintext
2019-08-24 23:26:26 +02:00