Crypto tests overhaul
So, based on the situation we introduced in #1035 (closed) (someone actually running tests with ./configure --without-ssl
), I rewrote the way we look for crypto/tls/https support.
A few things:
- Introduce a helper in common.js that checks for
process.versions.openssl
. This could potentially be changed to try importing crypto instead. - Review all tests that fail (and the one's that imported tls, https or crypto) to use the new check
- Unify tests that had their own way of checking for various types of crypto support
- Have a few tests do partial runs (one or two) -- for instance tests that checks both against http and https servers. These should probably be moved out to their own tests
- Fix fallout found in for instance testing
process.versions
(my bad) - Avoid style/lint changes as much as possible, but update two tests (2a4a51d) that broke because they imported https while not using it.
Since this affects a lot of files I'd appreciate a quicker feedback round; can see myself rebasing this a fair few times otherwise.