Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

fix: remove external urls from addFromURL tests #834

Merged
merged 4 commits into from
Aug 15, 2018

Conversation

alanshaw
Copy link
Contributor

@alanshaw alanshaw commented Aug 14, 2018

Relying on external URLs makes our tests dependent on the availability and response time of these services as well as not being able to run without an internet connection. This PR removes those requests to external URLs and instead spins up test HTTP(S) servers as they are needed to serve the content that ipfs.util.addFromURL consumes.

This PR also strengthens some of the tests to make assertions that the result received by ipfs.util.addFromURL is the same as the result of adding the data directly using ipfs.add.

resolves #803

Relying on external URLs makes our tests dependent on the availability and response time of these services as well as not being able to run without an internet connection. This PR removes those requests to external URLs and instead spins up test HTTP(s) servers as they are needed to serve the content that `ipfs.util.addFromURL` consumes.

resolves #803

License: MIT
Signed-off-by: Alan Shaw <alan@tableflip.io>
License: MIT
Signed-off-by: Alan Shaw <alan@tableflip.io>
@ghost ghost assigned alanshaw Aug 14, 2018
@ghost ghost added the in progress label Aug 14, 2018
License: MIT
Signed-off-by: Alan Shaw <alan@tableflip.io>
License: MIT
Signed-off-by: Alan Shaw <alan@tableflip.io>
Copy link
Collaborator

@achingbrain achingbrain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@achingbrain
Copy link
Collaborator

One comment - you can use the pem module to generate SSL certs on the fly instead of hard coding them. Though it calls out to the openssl cli tool in the background, not sure of Windows support off the top of my head. As long as it's installed on our Windows Jenkins workers, I guess.

Copy link
Contributor

@daviddias daviddias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏🏽👏🏽👏🏽 Thank you!

@alanshaw alanshaw merged commit 7cf7998 into master Aug 15, 2018
@ghost ghost removed the in progress label Aug 15, 2018
@alanshaw alanshaw deleted the fix/remove-external-urls-from-addFromURL-tests branch August 15, 2018 07:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove reliance on external services for util.addFromURL tests
3 participants