From 778fbdd071829fc245df7388fa5edc47828a4489 Mon Sep 17 00:00:00 2001 From: Paul Marion Camantigue Date: Fri, 6 Oct 2017 10:55:49 -0700 Subject: [PATCH 1/4] test: common.fixturesDir --> common.fixtures Replaced `common.fixturesDir` with usage of `common.fixtures` module in `test/parallel/test-tls-delayed-atach.js`. Checklist [*] `make -j4 test` (UNIX), or `vcbuild test` (Windows) passes --- test/parallel/test-tls-delayed-attach.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/parallel/test-tls-delayed-attach.js b/test/parallel/test-tls-delayed-attach.js index 9ab611566583b4..8d86dbbb288ab3 100644 --- a/test/parallel/test-tls-delayed-attach.js +++ b/test/parallel/test-tls-delayed-attach.js @@ -24,17 +24,18 @@ const common = require('../common'); if (!common.hasCrypto) common.skip('missing crypto'); + +const fixtures = require('../common/fixtures'); const assert = require('assert'); const tls = require('tls'); -const fs = require('fs'); const net = require('net'); const sent = 'hello world'; let received = ''; const options = { - key: fs.readFileSync(`${common.fixturesDir}/keys/agent1-key.pem`), - cert: fs.readFileSync(`${common.fixturesDir}/keys/agent1-cert.pem`) + key: fixtures.readSync('/keys/agent1-key.pem'), + cert: fixtures.readSync('/keys/agent1-cert.pem') }; const server = net.createServer(function(c) { From 0414bced86075a461a63c4c942add3a1d9ede76a Mon Sep 17 00:00:00 2001 From: Paul Camantigue Date: Fri, 20 Oct 2017 07:31:27 -0700 Subject: [PATCH 2/4] Update test-tls-delayed-attach.js --- test/parallel/test-tls-delayed-attach.js | 1 - 1 file changed, 1 deletion(-) diff --git a/test/parallel/test-tls-delayed-attach.js b/test/parallel/test-tls-delayed-attach.js index 8d86dbbb288ab3..6e5a159e4bbe03 100644 --- a/test/parallel/test-tls-delayed-attach.js +++ b/test/parallel/test-tls-delayed-attach.js @@ -24,7 +24,6 @@ const common = require('../common'); if (!common.hasCrypto) common.skip('missing crypto'); - const fixtures = require('../common/fixtures'); const assert = require('assert'); const tls = require('tls'); From 15579d4b30a78b97c791ae1d85d5643c9cdcb2f3 Mon Sep 17 00:00:00 2001 From: Paul Camantigue Date: Fri, 20 Oct 2017 07:38:32 -0700 Subject: [PATCH 3/4] Used Fixtures's readKey instead of readSync Utilized the fixtures module's readKey function instead of readSync and removed an unnecessary line of space. --- test/parallel/test-tls-delayed-attach.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-tls-delayed-attach.js b/test/parallel/test-tls-delayed-attach.js index 6e5a159e4bbe03..853deba88ecee2 100644 --- a/test/parallel/test-tls-delayed-attach.js +++ b/test/parallel/test-tls-delayed-attach.js @@ -33,8 +33,8 @@ const sent = 'hello world'; let received = ''; const options = { - key: fixtures.readSync('/keys/agent1-key.pem'), - cert: fixtures.readSync('/keys/agent1-cert.pem') + key: fixtures.readKey('/keys/agent1-key.pem'), + cert: fixtures.readKey('/keys/agent1-cert.pem') }; const server = net.createServer(function(c) { From c21f0b23da3788633cf7aede0a49e29d5c11ba6f Mon Sep 17 00:00:00 2001 From: Paul Camantigue Date: Fri, 20 Oct 2017 07:51:57 -0700 Subject: [PATCH 4/4] Removed /keys/ for key file path Removed `/keys/` from the key file path string as the readKey function handles that for you. --- test/parallel/test-tls-delayed-attach.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-tls-delayed-attach.js b/test/parallel/test-tls-delayed-attach.js index 853deba88ecee2..fc5eaaa884c578 100644 --- a/test/parallel/test-tls-delayed-attach.js +++ b/test/parallel/test-tls-delayed-attach.js @@ -33,8 +33,8 @@ const sent = 'hello world'; let received = ''; const options = { - key: fixtures.readKey('/keys/agent1-key.pem'), - cert: fixtures.readKey('/keys/agent1-cert.pem') + key: fixtures.readKey('agent1-key.pem'), + cert: fixtures.readKey('agent1-cert.pem') }; const server = net.createServer(function(c) {