-
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
test: move require('https') to after crypto check #25388
Conversation
Currently, test-https-client-override-global-agent.js fails with the following error when configured --without-ssl: Error [ERR_NO_CRYPTO]: Node.js is not compiled with OpenSSL crypto support at Object.assertCrypto (internal/util.js:101:11) ... at Object.<anonymous> (/node/test/parallel/test-https-client-override-global-agent.js:5:15) This commit moves the require statement to after the crypto check.
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.
LGTM.
I suggest moving the check to immediately after const common = ...
. If we standardize on doing crypto (and other) checks before loading any other modules, it may be possible to update our current "include cyprto check" lint rule to also make sure the crypto check happens before any other modules are loaded, catching this sort of thing before it happens.
Sounds good, I'll update shortly. Thanks |
Re-run of failing node-test-commit-freebsd ✔️ |
Landed in 9abb646. |
Currently, test-https-client-override-global-agent.js fails with the following error when configured --without-ssl: Error [ERR_NO_CRYPTO]: Node.js is not compiled with OpenSSL crypto support at Object.assertCrypto (internal/util.js:101:11) ... at Object.<anonymous> (/node/test/parallel/test-https-client-override-global-agent.js:5:15) This commit moves the require statement to after the crypto check. PR-URL: #25388 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: James M Snell <[email protected]>
This commit updates the custom crypto-check ESLint rule to detect require() calls that come before any hasCrypto checks. PR-URL: #25399 Refs: #25388 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]>
Currently, test-https-client-override-global-agent.js fails with the following error when configured --without-ssl: Error [ERR_NO_CRYPTO]: Node.js is not compiled with OpenSSL crypto support at Object.assertCrypto (internal/util.js:101:11) ... at Object.<anonymous> (/node/test/parallel/test-https-client-override-global-agent.js:5:15) This commit moves the require statement to after the crypto check. PR-URL: #25388 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: James M Snell <[email protected]>
This commit updates the custom crypto-check ESLint rule to detect require() calls that come before any hasCrypto checks. PR-URL: #25399 Refs: #25388 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]>
Currently, test-https-client-override-global-agent.js fails with the following error when configured --without-ssl: Error [ERR_NO_CRYPTO]: Node.js is not compiled with OpenSSL crypto support at Object.assertCrypto (internal/util.js:101:11) ... at Object.<anonymous> (/node/test/parallel/test-https-client-override-global-agent.js:5:15) This commit moves the require statement to after the crypto check. PR-URL: nodejs#25388 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: James M Snell <[email protected]>
This commit updates the custom crypto-check ESLint rule to detect require() calls that come before any hasCrypto checks. PR-URL: nodejs#25399 Refs: nodejs#25388 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]>
Currently, test-https-client-override-global-agent.js fails with the following error when configured --without-ssl: Error [ERR_NO_CRYPTO]: Node.js is not compiled with OpenSSL crypto support at Object.assertCrypto (internal/util.js:101:11) ... at Object.<anonymous> (/node/test/parallel/test-https-client-override-global-agent.js:5:15) This commit moves the require statement to after the crypto check. PR-URL: #25388 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: James M Snell <[email protected]>
This commit updates the custom crypto-check ESLint rule to detect require() calls that come before any hasCrypto checks. PR-URL: #25399 Refs: #25388 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]>
Currently, test-https-client-override-global-agent.js fails with the following error when configured --without-ssl: Error [ERR_NO_CRYPTO]: Node.js is not compiled with OpenSSL crypto support at Object.assertCrypto (internal/util.js:101:11) ... at Object.<anonymous> (/node/test/parallel/test-https-client-override-global-agent.js:5:15) This commit moves the require statement to after the crypto check. PR-URL: #25388 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: James M Snell <[email protected]>
This commit updates the custom crypto-check ESLint rule to detect require() calls that come before any hasCrypto checks. PR-URL: #25399 Refs: #25388 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]>
Currently, test-https-client-override-global-agent.js fails with the following error when configured --without-ssl: Error [ERR_NO_CRYPTO]: Node.js is not compiled with OpenSSL crypto support at Object.assertCrypto (internal/util.js:101:11) ... at Object.<anonymous> (/node/test/parallel/test-https-client-override-global-agent.js:5:15) This commit moves the require statement to after the crypto check. PR-URL: #25388 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: James M Snell <[email protected]>
This commit updates the custom crypto-check ESLint rule to detect require() calls that come before any hasCrypto checks. PR-URL: #25399 Refs: #25388 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]>
Currently, test-https-client-override-global-agent.js fails with the
following error when configured
--without-ssl
:This commit moves the require statement to after the crypto check.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes