feat: add IPv6 variants to transport integration tests#3378
feat: add IPv6 variants to transport integration tests#3378asmit27rai wants to merge 3 commits intolibp2p:masterfrom
Conversation
|
@MarcoPolo Please Review This Pull Request. |
|
@asmit27rai : Wish to ask if the PR has been tested locally. Please attend the upcoming libp2p calls. We will work out a clear plan on ensuring we are meeting the requisite needs in reference to go-libp2p. CCing @dhuseby. |
Yes. I Tested It Locally. go test ./p2p/test/transport -v | grep IPv6Output: --- PASS: TestReadWriteDeadlines/TCP_/_Noise_/_Yamux_(IPv6) (0.05s)
--- PASS: TestReadWriteDeadlines/TCP_/_Noise_/_Yamux_(IPv6)/ReadDeadline (0.01s)
--- PASS: TestReadWriteDeadlines/TCP_/_Noise_/_Yamux_(IPv6)/WriteDeadline (0.01s)
--- PASS: TestReadWriteDeadlines/TCP_/_Noise_/_Yamux_(IPv6)/SetDeadline (0.02s)
--- PASS: TestReadWriteDeadlines/TCP_/_Noise_/_Yamux_(IPv6)/SetDeadline/Read (0.01s)
--- PASS: TestReadWriteDeadlines/TCP_/_Noise_/_Yamux_(IPv6)/SetDeadline/Write (0.01s)
--- PASS: TestReadWriteDeadlines/TCP_/_TLS_/_Yamux_(IPv6) (0.05s)
--- PASS: TestReadWriteDeadlines/TCP_/_TLS_/_Yamux_(IPv6)/ReadDeadline (0.01s)
--- PASS: TestReadWriteDeadlines/TCP_/_TLS_/_Yamux_(IPv6)/WriteDeadline (0.01s) |
|
@aspiringsecurity I didn't able to join previous community call of libp2p. So, I just want you to please review this PR. |
|
Can you debug why the CI is failing? |
- Duplicate each existing transport test case with IPv6 localhost (::1) addresses - Append (IPv6) to the test case name for clarity - Ensure IPv6 ListenAddrStrings match the IPv4 equivalents - Maintain existing security, muxer, and transport options for IPv6 variants
6bf31c8 to
62818ea
Compare
|
@MarcoPolo Can you please test it again ? |
|
Looks like you just skipped the test? Why does it fail in the first place? You can run these tests on your forked branch as well. |
You're totally correct. I just pushed some changes please have a look. |
|
Please run the workflows on your branch and mark this ready for review when you have a clear understanding of the issue. Thanks! |
Overview
This PR adds IPv6 coverage to all existing transport integration tests in
transport_test.go. Each transport configuration now has two test cases: one for IPv4 (127.0.0.1) and one for IPv6 (::1). This ensures libp2p’s transports are tested on both IP versions and prevents regressions in IPv6 environments.Changes
p2p/test/transport/transport_test.goTest
Output:
--- PASS: TestReadWriteDeadlines/TCP_/_Noise_/_Yamux_(IPv6) (0.05s) --- PASS: TestReadWriteDeadlines/TCP_/_Noise_/_Yamux_(IPv6)/ReadDeadline (0.01s) --- PASS: TestReadWriteDeadlines/TCP_/_Noise_/_Yamux_(IPv6)/WriteDeadline (0.01s) --- PASS: TestReadWriteDeadlines/TCP_/_Noise_/_Yamux_(IPv6)/SetDeadline (0.02s) --- PASS: TestReadWriteDeadlines/TCP_/_Noise_/_Yamux_(IPv6)/SetDeadline/Read (0.01s) --- PASS: TestReadWriteDeadlines/TCP_/_Noise_/_Yamux_(IPv6)/SetDeadline/Write (0.01s) --- PASS: TestReadWriteDeadlines/TCP_/_TLS_/_Yamux_(IPv6) (0.05s) --- PASS: TestReadWriteDeadlines/TCP_/_TLS_/_Yamux_(IPv6)/ReadDeadline (0.01s) --- PASS: TestReadWriteDeadlines/TCP_/_TLS_/_Yamux_(IPv6)/WriteDeadline (0.01s)Fixes: #2510