From 5c20164354b5fad1d8b423312bb008ee29cc130f Mon Sep 17 00:00:00 2001 From: Mark Walker Date: Fri, 6 Oct 2017 10:32:00 -0700 Subject: [PATCH] test: use fixtures module in tls-handshake-error PR-URL: https://github.com/nodejs/node/pull/15939 Reviewed-By: Joyee Cheung Reviewed-By: Gireesh Punathil --- test/parallel/test-tls-handshake-error.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/parallel/test-tls-handshake-error.js b/test/parallel/test-tls-handshake-error.js index 9ae1f31dfd6ba1..c079d86c9421b2 100644 --- a/test/parallel/test-tls-handshake-error.js +++ b/test/parallel/test-tls-handshake-error.js @@ -1,16 +1,18 @@ 'use strict'; const common = require('../common'); + if (!common.hasCrypto) common.skip('missing crypto'); const assert = require('assert'); const tls = require('tls'); -const fs = require('fs'); + +const fixtures = require('../common/fixtures'); const server = tls.createServer({ - key: fs.readFileSync(`${common.fixturesDir}/keys/agent1-key.pem`), - cert: fs.readFileSync(`${common.fixturesDir}/keys/agent1-cert.pem`), + key: fixtures.readKey('agent1-key.pem'), + cert: fixtures.readKey('agent1-cert.pem'), rejectUnauthorized: true }, function(c) { }).listen(0, common.mustCall(function() {