Skip to content

Commit

Permalink
docs(interop-tests): minor fixes to README
Browse files Browse the repository at this point in the history
Pull-Request: #4915.
  • Loading branch information
andreasbros authored Nov 23, 2023
1 parent add1ff6 commit 3b6b74d
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions interop-tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ 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:

1. Start redis (needed by the tests): `docker run --rm -p 6379:6379 redis:7-alpine`.
2. In one terminal run the dialer: `redis_addr=localhost:6379 ip="0.0.0.0" transport=quic-v1 security=quic muxer=quic is_dialer="true" cargo run --bin ping`
3. In another terminal, run the listener: `redis_addr=localhost:6379 ip="0.0.0.0" transport=quic-v1 security=quic muxer=quic is_dialer="false" cargo run --bin native_ping`
1. Start redis (needed by the tests): `docker run --rm -p 6379:6379 redis:7-alpine`
2. In one terminal run the dialer: `RUST_LOG=debug redis_addr=localhost:6379 ip="0.0.0.0" transport=tcp security=noise muxer=yamux is_dialer="true" cargo run --bin native_ping`
3. In another terminal, run the listener: `RUST_LOG=debug redis_addr=localhost:6379 ip="0.0.0.0" transport=tcp security=noise muxer=yamux is_dialer="false" cargo run --bin native_ping`

If 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.
Expand All @@ -30,9 +32,9 @@ Firefox is not yet supported as it doesn't support all required features yet
To run the webrtc-direct test, you'll need the `chromedriver` in your `$PATH`, compatible with your Chrome browser.

1. Start redis: `docker run --rm -p 6379:6379 redis:7-alpine`.
1. Build the wasm package: `wasm-pack build --target web`
1. With the webrtc-direct listener `RUST_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_ping`
1. Run the webrtc-direct dialer: `RUST_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_ping`
2. Build the wasm package: `wasm-pack build --target web`
3. With the webrtc-direct listener `RUST_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_ping`
4. Run the webrtc-direct dialer: `RUST_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_ping`

# Running all interop tests locally with Compose

Expand All @@ -41,8 +43,8 @@ To run this test against all released libp2p versions you'll need to have the
the following (from the root directory of this repository):

1. Build the image: `docker build -t rust-libp2p-head . -f interop-tests/Dockerfile`.
1. Build the images for all released versions in `libp2p/test-plans`: `(cd <path to >/libp2p/test-plans/multidim-interop/ && make)`.
1. Run the test:
2. Build the images for all released versions in `libp2p/test-plans`: `(cd <path to >/libp2p/test-plans/multidim-interop/ && make)`.
3. Run the test:
```
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")
```

0 comments on commit 3b6b74d

Please sign in to comment.