From 0caca454340ac300c3bcd7bd1907a6d441e2f1a6 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Sat, 15 Apr 2017 12:04:03 +0200 Subject: [PATCH] test: add crypto check to crypto-lazy-transform When configuring --without-ssl test-crypto-lazy-transform-writable.js fails with the following error: ``` Path: parallel/test-crypto-lazy-transform-writable internal/util.js:83 throw new Error('Node.js is not compiled with openssl crypto support'); ^ Error: Node.js is not compiled with openssl crypto support at Object.exports.assertCrypto (internal/util.js:83:11) at crypto.js:28:14 at NativeModule.compile (bootstrap_node.js:557:7) at Function.NativeModule.require (bootstrap_node.js:500:18) at Function.Module._load (module.js:446:25) at Module.require (module.js:526:17) at require (internal/module.js:19:18) at Object. (/Users/danielbevenius/work/nodejs/node/test/parallel/test-crypto-lazy-transform-writable.js:5:16) at Module._compile (module.js:607:30) at Object.Module._extensions..js (module.js:618:10) Command: out/Release/node /Users/danielbevenius/work/nodejs/node/test/parallel/test-crypto-lazy-transform-writable.js [01:29|% 100|+ 1461|- 1]: Done make: *** [test] Error 1 ``` This commit add a hasCrypto check like other crypto tests do. PR-URL: https://github.com/nodejs/node/pull/12424 Reviewed-By: Sakthipriyan Vairamani Reviewed-By: Richard Lau Reviewed-By: Benjamin Gruenbaum Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- test/parallel/test-crypto-lazy-transform-writable.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/parallel/test-crypto-lazy-transform-writable.js b/test/parallel/test-crypto-lazy-transform-writable.js index 2c4fbaf39a6738..9008ebc5f910a6 100644 --- a/test/parallel/test-crypto-lazy-transform-writable.js +++ b/test/parallel/test-crypto-lazy-transform-writable.js @@ -1,6 +1,10 @@ 'use strict'; const common = require('../common'); +if (!common.hasCrypto) { + common.skip('missing crypto'); + return; +} const assert = require('assert'); const crypto = require('crypto'); const Stream = require('stream');