Browse Source

test: ignore tests when built without OpenSSL CLI

fix #6880
v0.11.11-release
Fedor Indutny 11 years ago
parent
commit
442d2d0cde
  1. 3
      test/common.js
  2. 5
      test/pummel/test-https-ci-reneg-attack.js
  3. 5
      test/pummel/test-tls-ci-reneg-attack.js
  4. 8
      test/pummel/test-tls-securepair-client.js
  5. 8
      test/pummel/test-tls-session-timeout.js
  6. 7
      test/simple/test-https-foafssl.js
  7. 6
      test/simple/test-tls-ecdh-disable.js
  8. 6
      test/simple/test-tls-ecdh.js
  9. 8
      test/simple/test-tls-securepair-server.js
  10. 8
      test/simple/test-tls-server-verify.js
  11. 7
      test/simple/test-tls-session-cache.js
  12. 6
      test/simple/test-tls-set-ciphers.js

3
test/common.js

@ -20,6 +20,7 @@
// USE OR OTHER DEALINGS IN THE SOFTWARE.
var path = require('path');
var fs = require('fs');
var assert = require('assert');
exports.testDir = path.dirname(__filename);
@ -35,6 +36,8 @@ if (process.platform === 'win32') {
exports.PIPE = exports.tmpDir + '/test.sock';
exports.opensslCli = path.join(process.execPath, '..', 'openssl-cli');
}
if (!fs.existsSync(exports.opensslCli))
exports.opensslCli = false;
var util = require('util');
for (var i in util) exports[i] = util[i];

5
test/pummel/test-https-ci-reneg-attack.js

@ -26,6 +26,11 @@ var tls = require('tls');
var https = require('https');
var fs = require('fs');
if (!common.opensslCli) {
console.error('Skipping because node compiled without OpenSSL CLI.');
process.exit(0);
}
// renegotiation limits to test
var LIMITS = [0, 1, 2, 3, 5, 10, 16];

5
test/pummel/test-tls-ci-reneg-attack.js

@ -25,6 +25,11 @@ var spawn = require('child_process').spawn;
var tls = require('tls');
var fs = require('fs');
if (!common.opensslCli) {
console.error('Skipping because node compiled without OpenSSL CLI.');
process.exit(0);
}
// renegotiation limits to test
var LIMITS = [0, 1, 2, 3, 5, 10, 16];

8
test/pummel/test-tls-securepair-client.js

@ -18,13 +18,15 @@
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
//
var common = require('../common');
if (!process.versions.openssl) {
console.error('Skipping because node compiled without OpenSSL.');
if (!common.opensslCli) {
console.error('Skipping because node compiled without OpenSSL CLI.');
process.exit(0);
}
var common = require('../common');
var join = require('path').join;
var net = require('net');
var assert = require('assert');

8
test/pummel/test-tls-session-timeout.js

@ -19,10 +19,13 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
if (!process.versions.openssl) {
console.error('Skipping because node compiled without OpenSSL.');
var common = require('../common');
if (!common.opensslCli) {
console.error('Skipping because node compiled without OpenSSL CLI.');
process.exit(0);
}
doTest();
// This test consists of three TLS requests --
@ -34,7 +37,6 @@ doTest();
// that we used has expired by now.
function doTest() {
var common = require('../common');
var assert = require('assert');
var tls = require('tls');
var fs = require('fs');

7
test/simple/test-https-foafssl.js

@ -19,12 +19,13 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
if (!process.versions.openssl) {
console.error('Skipping because node compiled without OpenSSL.');
var common = require('../common');
if (!common.opensslCli) {
console.error('Skipping because node compiled without OpenSSL CLI.');
process.exit(0);
}
var common = require('../common');
var assert = require('assert');
var join = require('path').join;

6
test/simple/test-tls-ecdh-disable.js

@ -20,6 +20,12 @@
// USE OR OTHER DEALINGS IN THE SOFTWARE.
var common = require('../common');
if (!common.opensslCli) {
console.error('Skipping because node compiled without OpenSSL CLI.');
process.exit(0);
}
var assert = require('assert');
var exec = require('child_process').exec;
var tls = require('tls');

6
test/simple/test-tls-ecdh.js

@ -20,6 +20,12 @@
// USE OR OTHER DEALINGS IN THE SOFTWARE.
var common = require('../common');
if (!common.opensslCli) {
console.error('Skipping because node compiled without OpenSSL CLI.');
process.exit(0);
}
var assert = require('assert');
var exec = require('child_process').exec;
var tls = require('tls');

8
test/simple/test-tls-securepair-server.js

@ -19,13 +19,13 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
if (!process.versions.openssl) {
console.error('Skipping because node compiled without OpenSSL.');
var common = require('../common');
if (!common.opensslCli) {
console.error('Skipping because node compiled without OpenSSL CLI.');
process.exit(0);
}
var common = require('../common');
var assert = require('assert');
var join = require('path').join;

8
test/simple/test-tls-server-verify.js

@ -19,11 +19,10 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
var common = require('../common');
if (!process.versions.openssl) {
console.error('Skipping because node compiled without OpenSSL.');
if (!common.opensslCli) {
console.error('Skipping because node compiled without OpenSSL CLI.');
process.exit(0);
}
@ -121,7 +120,6 @@ var testCases =
];
var common = require('../common');
var constants = require('constants');
var assert = require('assert');
var fs = require('fs');

7
test/simple/test-tls-session-cache.js

@ -19,8 +19,10 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
if (!process.versions.openssl) {
console.error('Skipping because node compiled without OpenSSL.');
var common = require('../common');
if (!common.opensslCli) {
console.error('Skipping because node compiled without OpenSSL CLI.');
process.exit(0);
}
@ -31,7 +33,6 @@ doTest({ tickets: false } , function() {
});
function doTest(testOptions, callback) {
var common = require('../common');
var assert = require('assert');
var tls = require('tls');
var fs = require('fs');

6
test/simple/test-tls-set-ciphers.js

@ -20,6 +20,12 @@
// USE OR OTHER DEALINGS IN THE SOFTWARE.
var common = require('../common');
if (!common.opensslCli) {
console.error('Skipping because node compiled without OpenSSL CLI.');
process.exit(0);
}
var assert = require('assert');
var exec = require('child_process').exec;
var tls = require('tls');

Loading…
Cancel
Save