Skip to content
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

Fix: Blacklist redirect #118

Merged
merged 1 commit into from
Aug 4, 2017
Merged

Conversation

erikkemperman
Copy link
Member

Several tests were failing for me here, while the exact same code on gulp/master was somehow fine.

Superficially the errors seemed to be about flags, such as loglevel... But it was something else entirely.

Turns out an external change sabotaged a bunch of our tests here, viz. we now get a "moved permanently" (301) when fetching the blacklist, and apparently the wreck library doesn't follow redirects (by default).

I fixed the URL in this PR, perhaps the wreck options should be revisited some time.

This was pretty annoying to track down... The tests are already slightly tricky to debug because stdout and stderr are hijacked. But it becomes really problematic if a unit test depends on unrelated components, both internal (in this case, the getBlacklist module) and external (the corresponding webserver).

IMHO, it should not be possible for this kind of external change to break unit tests?

@sttk
Copy link
Contributor

sttk commented Aug 4, 2017

@erikkemperman I'm sorry my modification and gulp-test-tool annoyed you.

About the unit test of logLevel, using --verify flag is the only way for testing log.warn.

About gulp-test-tool, this tool is a thing to solve this issue on nodejs v0.10 on Windows, though I'm worried someone would say that.

I wish there are better alternatives...

@erikkemperman
Copy link
Member Author

Maybe "annoying" was the wrong word, let's make it "complicated". I wanted to submit a really simple PR but got stuck on all these failing tests :-)

If you agree this solves things at least for the time being, could you review and merge? Thanks!

@sttk sttk merged commit 5301b9e into gulpjs:master Aug 4, 2017
@sttk
Copy link
Contributor

sttk commented Aug 4, 2017

@erikkemperman I've reviewed this PR and it's good.
I didn't notice that the url of gulp's plugins registory was changed as http -> https 9 days ago.
Thank you for fixing this issue.

@erikkemperman
Copy link
Member Author

@sttk Thanks for review and merge! Unfortunately my day is almost over, so my simple little PR will have to wait a bit.

@erikkemperman erikkemperman deleted the fix-blacklist-redirect branch August 4, 2017 14:56
@phated
Copy link
Member

phated commented Aug 4, 2017

@erikkemperman sorry this tripped you up. Testing CLI tools is quite tricky in node, but hopefully we can make incremental improvements over time.

Also note that the SSL change was sprung on me and I didn't have a chance find everything that would be affected. Thanks for fixing this; I'll get it shipped in a patch.

@phated
Copy link
Member

phated commented Aug 4, 2017

Looks like we have some features and updates queued up so this will go out as 1.4.0

phated pushed a commit that referenced this pull request Dec 21, 2017
phated pushed a commit that referenced this pull request Dec 21, 2017
phated pushed a commit that referenced this pull request Dec 21, 2017
phated pushed a commit that referenced this pull request Dec 21, 2017
phated pushed a commit that referenced this pull request Dec 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants