-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd: alpha test peers - add direct connection test #3073
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3073 +/- ##
==========================================
- Coverage 56.49% 56.43% -0.06%
==========================================
Files 208 208
Lines 29020 29026 +6
==========================================
- Hits 16395 16381 -14
- Misses 10805 10826 +21
+ Partials 1820 1819 -1 ☔ View full report in Codecov by Sentry. |
d513538
to
9f4f6db
Compare
c0cac3e
to
65afd04
Compare
Quality Gate passedIssues Measures |
Adding test for direct connection between peers. This should also implicitly test if our NAT is open.
There is a separate ticket for unit testing for all peers tests, as there are more things to be improved on that side - there need to be couple of nodes spin up, with local relay, to be able to properly test the
testpeers.go
code. As soon as that is done, there will be better testing suite for that test case as well.To try locally, a local relay needs to be spin up first (or expose your IP and port, however, the former is easier):
./charon relay --p2p-tcp-address="0.0.0.0:9000" --p2p-advertise-private-addresses
./charon alpha test peers --enrs="enr:-Iu4QJyserRukhG0Vgi2csu7GjpHYUGufNEbZ8Q7ZBrcZUb0KqpL5QzHonkh1xxHlxatTxrIcX_IS5J3SEWR_sa0ptGAgmlkgnY0gmlwhH8AAAGJc2VjcDI1NmsxoQMAUgEqczOjevyculnUIofhCj0DkgJudErM7qCYIvIkzIN0Y3CCDhqDdWRwgg4u" --p2p-relays="http://127.0.0.1:3640" --p2p-tcp-address="127.0.0.1:9001" --load-test-duration=30s
I have also included small refactor of the return statements, making it a bit more readable.
category: feature
ticket: #3065