From d259accb11513daad05a27d8a313d13e66f211e3 Mon Sep 17 00:00:00 2001 From: Dolapo Toki Date: Fri, 6 Oct 2017 09:39:43 -0700 Subject: [PATCH 1/2] test: replaced fixturesDir with common.fixtures module --- test/parallel/test-tls-async-cb-after-socket-end.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-tls-async-cb-after-socket-end.js b/test/parallel/test-tls-async-cb-after-socket-end.js index 6b4d2bd9f58c9c..8591b3ab3c5007 100644 --- a/test/parallel/test-tls-async-cb-after-socket-end.js +++ b/test/parallel/test-tls-async-cb-after-socket-end.js @@ -1,6 +1,7 @@ 'use strict'; const common = require('../common'); +const fixtures = require('../common/fixtures'); if (!common.hasCrypto) common.skip('missing crypto'); @@ -12,8 +13,8 @@ const tls = require('tls'); const options = { secureOptions: SSL_OP_NO_TICKET, - key: fs.readFileSync(path.join(common.fixturesDir, 'test_key.pem')), - cert: fs.readFileSync(path.join(common.fixturesDir, 'test_cert.pem')) + key: fs.readFileSync(path.join(fixtures.fixturesDir, 'test_key.pem')), + cert: fs.readFileSync(path.join(fixtures.fixturesDir, 'test_cert.pem')) }; const server = tls.createServer(options, function(c) { From db07d1f0c110317dcd23870de9f873b34ab0eaf9 Mon Sep 17 00:00:00 2001 From: Dolapo Toki Date: Fri, 6 Oct 2017 15:09:40 -0700 Subject: [PATCH 2/2] test: cleanup file per ryan's suggestion --- test/parallel/test-tls-async-cb-after-socket-end.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/test/parallel/test-tls-async-cb-after-socket-end.js b/test/parallel/test-tls-async-cb-after-socket-end.js index 8591b3ab3c5007..5e81f02b071011 100644 --- a/test/parallel/test-tls-async-cb-after-socket-end.js +++ b/test/parallel/test-tls-async-cb-after-socket-end.js @@ -4,17 +4,13 @@ const common = require('../common'); const fixtures = require('../common/fixtures'); if (!common.hasCrypto) common.skip('missing crypto'); - -const path = require('path'); -const fs = require('fs'); const SSL_OP_NO_TICKET = require('crypto').constants.SSL_OP_NO_TICKET; - const tls = require('tls'); const options = { secureOptions: SSL_OP_NO_TICKET, - key: fs.readFileSync(path.join(fixtures.fixturesDir, 'test_key.pem')), - cert: fs.readFileSync(path.join(fixtures.fixturesDir, 'test_cert.pem')) + key: fixtures.readSync('test_key.pem'), + cert: fixtures.readSync('test_cert.pem') }; const server = tls.createServer(options, function(c) {