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

test: move require('https') to after crypto check #25388

Closed

Conversation

@danbev
Copy link
Member

commented Jan 8, 2019

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.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
test: move require('https') to after crypto check
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.
@danbev

This comment has been minimized.

Copy link
Member Author

commented Jan 8, 2019

@Trott
Trott approved these changes Jan 8, 2019
Copy link
Member

left a comment

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.

@danbev

This comment has been minimized.

Copy link
Member Author

commented Jan 8, 2019

I suggest moving the check to immediately after const common = ....

Sounds good, I'll update shortly. Thanks

@danbev

This comment has been minimized.

Copy link
Member Author

commented Jan 8, 2019

Re-run of failing node-test-commit-freebsd ✔️
Re-run of failing node-test-commit-smartos ✔️

@cjihrig
cjihrig approved these changes Jan 8, 2019
@cjihrig cjihrig referenced this pull request Jan 8, 2019
3 of 3 tasks complete
@jasnell
jasnell approved these changes Jan 8, 2019
@danbev

This comment has been minimized.

Copy link
Member Author

commented Jan 11, 2019

Landed in 9abb646.

@danbev danbev closed this Jan 11, 2019

@danbev danbev deleted the danbev:https-client-override-crypto-check branch Jan 11, 2019

danbev added a commit that referenced this pull request Jan 11, 2019
test: move require('https') to after crypto check
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 <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
danbev added a commit that referenced this pull request Jan 11, 2019
tools: update crypo check rule
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 <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
addaleax added a commit that referenced this pull request Jan 14, 2019
test: move require('https') to after crypto check
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 <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
addaleax added a commit that referenced this pull request Jan 14, 2019
tools: update crypo check rule
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 <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
@BridgeAR BridgeAR referenced this pull request Jan 16, 2019
BridgeAR added a commit to BridgeAR/node that referenced this pull request Jan 16, 2019
test: move require('https') to after crypto check
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 <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
BridgeAR added a commit to BridgeAR/node that referenced this pull request Jan 16, 2019
tools: update crypo check rule
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 <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
@MylesBorins MylesBorins referenced this pull request Jan 24, 2019
BethGriggs added a commit that referenced this pull request Apr 28, 2019
test: move require('https') to after crypto check
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 <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
BethGriggs added a commit that referenced this pull request Apr 28, 2019
tools: update crypo check rule
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 <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
@BethGriggs BethGriggs referenced this pull request May 1, 2019
BethGriggs added a commit that referenced this pull request May 10, 2019
test: move require('https') to after crypto check
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 <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
BethGriggs added a commit that referenced this pull request May 10, 2019
tools: update crypo check rule
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 <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
MylesBorins added a commit that referenced this pull request May 16, 2019
test: move require('https') to after crypto check
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 <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins added a commit that referenced this pull request May 16, 2019
tools: update crypo check rule
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 <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.