Browse Source

test: add hasCrypto check to test-cli-node-options

Currently when configure --without-ssl the test will throw the following
error:
bad option: --use-openssl-ca

This commit checks if crypto was enabled and skips the crypto related
tests if that is the case.

Backport-PR-URL: https://github.com/nodejs/node/pull/12677
PR-URL: https://github.com/nodejs/node/pull/12692
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>/
v6.x-staging
Daniel Bevenius 8 years ago
committed by Myles Borins
parent
commit
c98baa4433
No known key found for this signature in database GPG Key ID: 933B01F40B5CA946
  1. 8
      test/parallel/test-cli-node-options.js

8
test/parallel/test-cli-node-options.js

@ -51,9 +51,11 @@ expect('--track-heap-objects', 'B\n');
expect('--throw-deprecation', 'B\n');
expect('--zero-fill-buffers', 'B\n');
expect('--v8-pool-size=10', 'B\n');
expect('--use-openssl-ca', 'B\n');
expect('--use-bundled-ca', 'B\n');
expect('--openssl-config=_ossl_cfg', 'B\n');
if (common.hasCrypto) {
expect('--use-openssl-ca', 'B\n');
expect('--use-bundled-ca', 'B\n');
expect('--openssl-config=_ossl_cfg', 'B\n');
}
expect('--icu-data-dir=_d', 'B\n');
// V8 options

Loading…
Cancel
Save