From 8e62fcb2cf7833f79d3bd965fb5c42746fa9a781 Mon Sep 17 00:00:00 2001 From: Casie Lynch Date: Fri, 6 Oct 2017 09:46:22 -0700 Subject: [PATCH] test: replace fixturesDir in test-tls-connect Replace common.fixturesDir with fixtures module in test-tls-connect. PR-URL: https://github.com/nodejs/node/pull/15849 Reviewed-By: Gireesh Punathil Reviewed-By: Joyee Cheung --- test/parallel/test-tls-connect.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/parallel/test-tls-connect.js b/test/parallel/test-tls-connect.js index 1419bd3a5ea427..74f8c65cee1785 100644 --- a/test/parallel/test-tls-connect.js +++ b/test/parallel/test-tls-connect.js @@ -4,16 +4,16 @@ const common = require('../common'); if (!common.hasCrypto) common.skip('missing crypto'); +const fixtures = require('../common/fixtures'); + const assert = require('assert'); -const fs = require('fs'); -const path = require('path'); const tls = require('tls'); // https://github.com/joyent/node/issues/1218 // uncatchable exception on TLS connection error { - const cert = fs.readFileSync(path.join(common.fixturesDir, 'test_cert.pem')); - const key = fs.readFileSync(path.join(common.fixturesDir, 'test_key.pem')); + const cert = fixtures.readSync('test_cert.pem'); + const key = fixtures.readSync('test_key.pem'); const options = {cert: cert, key: key, port: common.PORT}; const conn = tls.connect(options, common.fail); @@ -26,8 +26,8 @@ const tls = require('tls'); // SSL_accept/SSL_connect error handling { - const cert = fs.readFileSync(path.join(common.fixturesDir, 'test_cert.pem')); - const key = fs.readFileSync(path.join(common.fixturesDir, 'test_key.pem')); + const cert = fixtures.readSync('test_cert.pem'); + const key = fixtures.readSync('test_key.pem'); const conn = tls.connect({ cert: cert,