diff options
author | Johan Bergström <bugs@bergstroem.nu> | 2015-03-04 12:09:07 +1100 |
---|---|---|
committer | Shigeki Ohtsu <ohtsu@iij.ad.jp> | 2015-03-05 10:31:41 +0900 |
commit | c7ad320472d69962b48e10e564682f24dd31d1d1 (patch) | |
tree | 77807cb602d412b3c520f2fed1346e5006446cbe /test | |
parent | 71776f90572fcc3c3c79089189bae3661a679b81 (diff) | |
download | node-new-c7ad320472d69962b48e10e564682f24dd31d1d1.tar.gz |
test: check for openssl cli and provide path if it exists
the previous version checked if io.js was compiled with openssl support which
isn't really relevant since we're starting a http server. we on the other hand
need an openssl-cli which may or may not exist.
PR-URL: https://github.com/iojs/io.js/pull/1049
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
Diffstat (limited to 'test')
-rw-r--r-- | test/parallel/test-http-curl-chunk-problem.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/parallel/test-http-curl-chunk-problem.js b/test/parallel/test-http-curl-chunk-problem.js index fd429c6d5f..58e195d4b4 100644 --- a/test/parallel/test-http-curl-chunk-problem.js +++ b/test/parallel/test-http-curl-chunk-problem.js @@ -1,11 +1,11 @@ -if (!process.versions.openssl) { - console.error('Skipping because node compiled without OpenSSL.'); +var common = require('../common'); +var assert = require('assert'); +if (!common.opensslCli) { + console.error('Skipping because node compiled without OpenSSL CLI.'); process.exit(0); } // http://groups.google.com/group/nodejs/browse_thread/thread/f66cd3c960406919 -var common = require('../common'); -var assert = require('assert'); var http = require('http'); var cp = require('child_process'); var fs = require('fs'); @@ -16,7 +16,7 @@ var count = 0; function maybeMakeRequest() { if (++count < 2) return; console.log('making curl request'); - var cmd = 'curl http://127.0.0.1:' + common.PORT + '/ | openssl sha1'; + var cmd = 'curl http://127.0.0.1:' + common.PORT + '/ | ' + common.opensslCli + ' sha1'; cp.exec(cmd, function(err, stdout, stderr) { if (err) throw err; var hex = stdout.match(/([A-Fa-f0-9]{40})/)[0]; |