Skip to content

Commit c7ad320

Browse files
jbergstroemShigeki Ohtsu
authored and
Shigeki Ohtsu
committed
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: #1049 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Shigeki Ohtsu <[email protected]>
1 parent 71776f9 commit c7ad320

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/parallel/test-http-curl-chunk-problem.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
if (!process.versions.openssl) {
2-
console.error('Skipping because node compiled without OpenSSL.');
1+
var common = require('../common');
2+
var assert = require('assert');
3+
if (!common.opensslCli) {
4+
console.error('Skipping because node compiled without OpenSSL CLI.');
35
process.exit(0);
46
}
57

68
// http://groups.google.com/group/nodejs/browse_thread/thread/f66cd3c960406919
7-
var common = require('../common');
8-
var assert = require('assert');
99
var http = require('http');
1010
var cp = require('child_process');
1111
var fs = require('fs');
@@ -16,7 +16,7 @@ var count = 0;
1616
function maybeMakeRequest() {
1717
if (++count < 2) return;
1818
console.log('making curl request');
19-
var cmd = 'curl http://127.0.0.1:' + common.PORT + '/ | openssl sha1';
19+
var cmd = 'curl http://127.0.0.1:' + common.PORT + '/ | ' + common.opensslCli + ' sha1';
2020
cp.exec(cmd, function(err, stdout, stderr) {
2121
if (err) throw err;
2222
var hex = stdout.match(/([A-Fa-f0-9]{40})/)[0];

0 commit comments

Comments
 (0)