From 1f741a50e6be2ce3d0994d026deb1801ef30e1cd Mon Sep 17 00:00:00 2001 From: Tom Boutell Date: Fri, 6 Oct 2017 09:24:33 -0700 Subject: [PATCH 1/2] use fixtures --- test/parallel/test-https-server-keep-alive-timeout.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-https-server-keep-alive-timeout.js b/test/parallel/test-https-server-keep-alive-timeout.js index ae6b4312684200..9c65998c0e7b9d 100644 --- a/test/parallel/test-https-server-keep-alive-timeout.js +++ b/test/parallel/test-https-server-keep-alive-timeout.js @@ -1,6 +1,8 @@ 'use strict'; const common = require('../common'); +const fixtures = require('../common/fixtures'); + if (!common.hasCrypto) common.skip('missing crypto'); @@ -11,8 +13,8 @@ const fs = require('fs'); const tests = []; const serverOptions = { - key: fs.readFileSync(`${common.fixturesDir}/keys/agent1-key.pem`), - cert: fs.readFileSync(`${common.fixturesDir}/keys/agent1-cert.pem`) + key: fs.readFileSync(fixtures.path('/keys/agent1-key.pem')), + cert: fs.readFileSync(fixtures.path('/keys/agent1-cert.pem')) }; function test(fn) { From 20fb9079223db6f3818039baa1f829f2dc55a298 Mon Sep 17 00:00:00 2001 From: Tom Boutell Date: Fri, 6 Oct 2017 11:40:27 -0700 Subject: [PATCH 2/2] per pawelgolda, use readKey to simplify the code --- test/parallel/test-https-server-keep-alive-timeout.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-https-server-keep-alive-timeout.js b/test/parallel/test-https-server-keep-alive-timeout.js index 9c65998c0e7b9d..7ab787dc33e569 100644 --- a/test/parallel/test-https-server-keep-alive-timeout.js +++ b/test/parallel/test-https-server-keep-alive-timeout.js @@ -13,8 +13,8 @@ const fs = require('fs'); const tests = []; const serverOptions = { - key: fs.readFileSync(fixtures.path('/keys/agent1-key.pem')), - cert: fs.readFileSync(fixtures.path('/keys/agent1-cert.pem')) + key: fixtures.readKey('agent1-key.pem'), + cert: fixtures.readKey('agent1-cert.pem') }; function test(fn) {