feat(interop): allow specifying port to bind to #220
+1
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Ping listeners implementations seem to all bind to random ports during test runs, then report their multiaddr to redis. Dialers receive the multiaddr from redis and dial it.
This is great when everything is under Docker.
If you are trying to run one half of the test from locally running code and the other from a docker container in order to debug things you need to know the port the docker half will be listening on when you build the container in order to
EXPOSE
the port and make it available to the host machine, so the docker half can't use random ports.Running the non-local half of the test as a Docker image is preferable to building from source since it reduces the amount of assumed knowledge the developer has about how to build a rust/nim/zig/go/js/java project and doesn't require them to set up esoteric toolchains for what is hopefully an infrequent task.
The change here is to specify a
port
env var that can be used to control this, defaulting to'0'
, the value that seems to be used everywhere currently.