-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds arbitrary port support to t0060-daemon.sh #2370
Conversation
# - also default ports: might clash with local clients. Failure in that case isn't clear as well because pollEndpoint just uses the already running node | ||
test_expect_success "ipfs daemon --init launches" ' | ||
ipfs daemon --init >actual_daemon 2>daemon_err & | ||
test_expect_success "ipfs daemon launches" ' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could reuse the test_launch_ipfs_daemon
code here i think
one comment, otherwise looks like a good step forward. The next step will be to make it nicely use port zero |
Awesome call on |
LGTM! |
apiport=5002 | ||
swarmport=4003 | ||
|
||
API_MADDR="/ip4/0.0.0.0/tcp/$apiport" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now that youre using test_launch_ipfs_daemon
it will handle setting these _MADDR
variables for you:
https://github.com/ipfs/go-ipfs/blob/master/test/sharness/lib/test-lib.sh#L196
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need them to be set here first, so I can provide them to ipfs init/config
before the daemon gets run.
I don't want to clobber what test-lib.sh
sets though, so I've renamed the vars and use the globals later on instead.
c1bc839
to
2f64de0
Compare
Removes all of the hardcoded ports and defaults to non-standard API, Gateway, and Swarm ports. License: MIT Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
License: MIT Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
License: MIT Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
License: MIT Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
🐴 ping @whyrusleeping for merge |
alright, LGTM |
Adds arbitrary port support to t0060-daemon.sh
Addresses #1936.
Removes all of the hardcoded ports and defaults to non-standard API,
Gateway, and Swarm ports.
A good next step would be to choose ports randomly in a looping fashion, so
that eventually a free set of ports can be found on the test machine.