-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
Crypto tests overhaul #1049
Crypto tests overhaul #1049
Conversation
since this applies to tls and https (among other things), it'll be used for those tests as well. if we decouple the build system to somehow support crypto but not tls, we could refine this.
the previous version checked if io.js was compiled with openssl support which isn't really relevant since we're starting a http server. we on the other hand need an openssl-cli which may or may not exist.
bf9bf8e
to
b9785b7
Compare
(changed some commit message texts) |
Left some comments. Perhaps it'd be nice to make the skip message TAP-compatible, i.e. |
@bnoordhuis Thanks for the feedback. I'll revise shortly. While going through a bunch of tests, I came to realise there's a fair few things to clean up and improve. With regards to your syntax suggestion, how about doing a helper for skip (and possibly exit) which is configurable so we more easily can control output? I guess its out of scope for this PR, but it could come shortly thereafter. |
Virtual shrug. Is there a need for it? |
b9785b7
to
5c764ff
Compare
@bnoordhuis just updated, fixing your remarks. I also split the https part of test-http-host-header into its own test. I left buffer alone for now. As for the helper: we could control skip output type so different test runner understands them. No strong argument though, tap is readable enough. |
5c764ff
to
ee99c67
Compare
Just added tap output (output suggested here). |
crypto.createHash('sha1').update(b1).digest('hex'), | ||
crypto.createHash('sha1').update(b2).digest('hex') | ||
); | ||
if(common.hasCrypto) { |
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.
styles: Missing space before "(". There are the same styles in this diff.
Tests files are usually not checked by gjshint so we might need not to care about styles so much.
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.
Darn it, this case slipped through.
I run tests without ssl and |
Good point regarding pummel. I'll have a look at that as well. |
we had a few ways versions of looking for support before executing a test. this commit unifies them as well as add the check for all tests that previously lacked them. found by running `./configure --without-ssl && make test`. also, produce tap skip output if the test is skipped.
this makes the separation between http and https testing cleaner
ee99c67
to
d28898e
Compare
@shigeki fixed the styling nit as well as broken tests in |
PR-URL: #1049 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
since this applies to tls and https (among other things), it'll be used for those tests as well. if we decouple the build system to somehow support crypto but not tls, we could refine this. PR-URL: #1049 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
PR-URL: #1049 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
the previous version checked if io.js was compiled with openssl support which isn't really relevant since we're starting a http server. we on the other hand need an openssl-cli which may or may not exist. PR-URL: #1049 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
we had a few ways versions of looking for support before executing a test. this commit unifies them as well as add the check for all tests that previously lacked them. found by running `./configure --without-ssl && make test`. also, produce tap skip output if the test is skipped. PR-URL: #1049 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
this makes the separation between http and https testing cleaner PR-URL: #1049 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
@shigeki That's fine. My only nit is about the commit logs: the first line should be <= 50 chars, the body <= 72 chars and properly capitalized and punctuated. |
So, based on the situation we introduced in #1035 (someone actually running tests with
./configure --without-ssl
), I rewrote the way we look for crypto/tls/https support.A few things:
process.versions.openssl
. This could potentially be changed to try importing crypto instead.process.versions
(my bad)Since this affects a lot of files I'd appreciate a quicker feedback round; can see myself rebasing this a fair few times otherwise.