fix: clash between daemon --api flag and cli tests #4241
Merged
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.
Currently the payment channel CLI tests use a
--api
flag to indicate which server to create a client API against (payment channel creator or payment channel receiver).lotus daemon
also takes a--api
flag that indicates the port on which to start.This PR fixes the clash by changing the flag that the tests use to
--api-url
It also makes it possible to specify the api using a regular url (instead of a multiaddress):
FULLNODE_API_INFO=<token>:/ip4/127.0.0.1/tcp/1234 go run ./cmd/lotus wallet balance t01234
FULLNODE_API_INFO="<token>:ws://127.0.0.1:1234" go run ./cmd/lotus wallet balance t01234
This can be useful for example if a websocket url has a path (currently not possible to represent with a multiaddress).