From c98baa44338a1512398caf3053cfae0b0b70ec14 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Thu, 27 Apr 2017 10:11:40 +0200 Subject: [PATCH] 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 Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Sam Roberts / --- test/parallel/test-cli-node-options.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/parallel/test-cli-node-options.js b/test/parallel/test-cli-node-options.js index 97ab20bf9c..eb53fa8f3d 100644 --- a/test/parallel/test-cli-node-options.js +++ b/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