interop-tests/README.md
This folder defines the implementation for the interop tests.
You can run this test locally by having a local Redis instance and by having another peer that this test can dial or listen for. For example to test that we can dial/listen for ourselves we can do the following:
docker run --rm -p 6379:6379 redis:7-alpineRUST_LOG=debug redis_addr=localhost:6379 ip="0.0.0.0" transport=tcp security=noise muxer=yamux is_dialer="true" cargo run --bin native_pingRUST_LOG=debug redis_addr=localhost:6379 ip="0.0.0.0" transport=tcp security=noise muxer=yamux is_dialer="false" cargo run --bin native_pingIf testing transport=quic-v1, then remove security and muxer variables from command line, because QUIC protocol comes with its own encryption and multiplexing.
To test the interop with other versions do something similar, except replace one of these nodes with the other version's interop test.
To run the webtransport test from within the browser, you'll need the
chromedriver in your $PATH, compatible with your Chrome browser.
Firefox is not yet supported as it doesn't support all required features yet
(in v114 there is no support for certhashes).
wasm-pack build --target webredis_addr=127.0.0.1:6379 ip=0.0.0.0 transport=webtransport is_dialer=true cargo run --bin wasm_pingTo run the webrtc-direct test, you'll need the chromedriver in your $PATH, compatible with your Chrome browser.
docker run --rm -p 6379:6379 redis:7-alpine.wasm-pack build --target webRUST_LOG=debug,webrtc=off,webrtc_sctp=off redis_addr="127.0.0.1:6379" ip="0.0.0.0" transport=webrtc-direct is_dialer="false" cargo run --bin native_pingRUST_LOG=debug,hyper=off redis_addr="127.0.0.1:6379" ip="0.0.0.0" transport=webrtc-direct is_dialer=true cargo run --bin wasm_pingTo run this test against all released libp2p versions you'll need to have the libp2p/test-plans checked out. Then do the following (from the root directory of this repository):
docker build -t rust-libp2p-head . -f interop-tests/Dockerfile.libp2p/test-plans: (cd <path to >/libp2p/test-plans/multidim-interop/ && make).RUST_LIBP2P="$PWD"; (cd <path to >/libp2p/test-plans/multidim-interop/ && npm run test -- --extra-version=$RUST_LIBP2P/interop-tests/ping-version.json --name-filter="rust-libp2p-head")