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: check crypto before requiring tls module #14708

Closed
wants to merge 1 commit into from

Conversation

danbev
Copy link
Contributor

@danbev danbev commented Aug 9, 2017

test-tls-session-cache currently fails if built --without-ssl:

internal/util.js:82
    throw new errors.Error('ERR_NO_CRYPTO');
    ^

Error [ERR_NO_CRYPTO]: Node.js is not compiled with OpenSSL crypto
support
    at Object.assertCrypto (internal/util.js:82:11)
    at tls.js:26:14
    at NativeModule.compile (bootstrap_node.js:586:7)
    at Function.NativeModule.require (bootstrap_node.js:531:18)
    at Function.Module._load (module.js:449:25)
    at Module.require (module.js:517:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous>
(/node/test/parallel/test-tls-session-cache.js:26:13)
    at Module._compile (module.js:573:30)
    at Object.Module._extensions..js (module.js:584:10)

The test has a crypto check but it come after the require of the tls
module.

This commit moves the crypto check to come before the require of tls and
allows the test to pass.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

test

test-tls-session-cache currently fails if built --without-ssl:
internal/util.js:82
    throw new errors.Error('ERR_NO_CRYPTO');
    ^

Error [ERR_NO_CRYPTO]: Node.js is not compiled with OpenSSL crypto
support
    at Object.assertCrypto (internal/util.js:82:11)
    at tls.js:26:14
    at NativeModule.compile (bootstrap_node.js:586:7)
    at Function.NativeModule.require (bootstrap_node.js:531:18)
    at Function.Module._load (module.js:449:25)
    at Module.require (module.js:517:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous>
(/node/test/parallel/test-tls-session-cache.js:26:13)
    at Module._compile (module.js:573:30)
    at Object.Module._extensions..js (module.js:584:10)

The test has a crypto check but it come after the require of the tls
module.

This commit moves the crypto check to come before the require of tls and
allows the test to pass.
@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Aug 9, 2017
@danbev
Copy link
Contributor Author

danbev commented Aug 9, 2017

@mscdex mscdex added the tls Issues and PRs related to the tls subsystem. label Aug 9, 2017
danbev added a commit to danbev/node that referenced this pull request Aug 11, 2017
test-tls-session-cache currently fails if built --without-ssl:
internal/util.js:82
    throw new errors.Error('ERR_NO_CRYPTO');
    ^

Error [ERR_NO_CRYPTO]: Node.js is not compiled with OpenSSL crypto
support
    at Object.assertCrypto (internal/util.js:82:11)
    at tls.js:26:14
    at NativeModule.compile (bootstrap_node.js:586:7)
    at Function.NativeModule.require (bootstrap_node.js:531:18)
    at Function.Module._load (module.js:449:25)
    at Module.require (module.js:517:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous>
(/node/test/parallel/test-tls-session-cache.js:26:13)
    at Module._compile (module.js:573:30)
    at Object.Module._extensions..js (module.js:584:10)

The test has a crypto check but it come after the require of the tls
module.

This commit moves the crypto check to come before the require of tls and
allows the test to pass.

PR-URL: nodejs#14708
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: David Cai <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@danbev
Copy link
Contributor Author

danbev commented Aug 11, 2017

Landed in 7307839

@danbev danbev closed this Aug 11, 2017
@danbev danbev deleted the tls-session-cache-crypto-check branch August 11, 2017 05:26
MylesBorins pushed a commit that referenced this pull request Sep 9, 2017
test-tls-session-cache currently fails if built --without-ssl:
internal/util.js:82
    throw new errors.Error('ERR_NO_CRYPTO');
    ^

Error [ERR_NO_CRYPTO]: Node.js is not compiled with OpenSSL crypto
support
    at Object.assertCrypto (internal/util.js:82:11)
    at tls.js:26:14
    at NativeModule.compile (bootstrap_node.js:586:7)
    at Function.NativeModule.require (bootstrap_node.js:531:18)
    at Function.Module._load (module.js:449:25)
    at Module.require (module.js:517:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous>
(/node/test/parallel/test-tls-session-cache.js:26:13)
    at Module._compile (module.js:573:30)
    at Object.Module._extensions..js (module.js:584:10)

The test has a crypto check but it come after the require of the tls
module.

This commit moves the crypto check to come before the require of tls and
allows the test to pass.

PR-URL: #14708
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: David Cai <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Sep 10, 2017
MylesBorins pushed a commit that referenced this pull request Sep 20, 2017
test-tls-session-cache currently fails if built --without-ssl:
internal/util.js:82
    throw new errors.Error('ERR_NO_CRYPTO');
    ^

Error [ERR_NO_CRYPTO]: Node.js is not compiled with OpenSSL crypto
support
    at Object.assertCrypto (internal/util.js:82:11)
    at tls.js:26:14
    at NativeModule.compile (bootstrap_node.js:586:7)
    at Function.NativeModule.require (bootstrap_node.js:531:18)
    at Function.Module._load (module.js:449:25)
    at Module.require (module.js:517:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous>
(/node/test/parallel/test-tls-session-cache.js:26:13)
    at Module._compile (module.js:573:30)
    at Object.Module._extensions..js (module.js:584:10)

The test has a crypto check but it come after the require of the tls
module.

This commit moves the crypto check to come before the require of tls and
allows the test to pass.

PR-URL: #14708
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: David Cai <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Sep 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Issues and PRs related to the tests. tls Issues and PRs related to the tls subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.