6b9c11680e
* Change PeerStore interface to use protocol.ID This reduces the string to protocol.ID translations happening at various places in the code * Fix misc cases of protocol.ID conversion * Merge multistream changes * Use protocol.ID in network.ConnectionState * don't update examples * fix error message tests * merge new go-multistream changes * update test-plans go mod * change transport back to string |
||
---|---|---|
.. | ||
cmd/ping | ||
.gitignore | ||
Makefile | ||
PingDockerfile | ||
README.md | ||
go.mod | ||
go.sum | ||
ping-versions.json |
README.md
test-plans test implementation
This folder defines the implementation for the test-plans interop tests.
Running this test locally
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:
- Start redis (needed by the tests):
docker run --rm -it -p 6379:6379 redis/redis-stack
. - 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" go run ./cmd/ping
- 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" go run ./cmd/ping
To test the interop with other versions do something similar, except replace one of these nodes with the other version's interop test.
Running all interop tests locally with Compose
To run this test against all released libp2p versions you'll need to have the (libp2p/test-plans)[https://github.com/libp2p/test-plans] checked out. Then do the following:
- Build the image:
make
. - Build the images for all released versions in
libp2p/test-plans
:(cd <path to >/libp2p/test-plans/multidim-interop/ && make)
. - Make a folder for the specified extra versions:
mkdir extra-versions && mv ping-versions.json extra-versions
- Run the test:
GO_LIBP2P_TEST_PLANS="$PWD"; (cd <path to >/libp2p/test-plans/multidim-interop/ && npm run test -- --extra-versions-dir=$GO_LIBP2P_TEST_PLANS/extra-versions --name-filter="go-libp2p-head")