From 6442a55ce5c7b203ff121166decdb876b30f39f4 Mon Sep 17 00:00:00 2001 From: Greg Byram Date: Fri, 6 Oct 2017 12:56:47 -0400 Subject: [PATCH 1/2] test: replace fixturesDir with fixtures in https agent create connection test --- test/parallel/test-https-agent-create-connection.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/parallel/test-https-agent-create-connection.js b/test/parallel/test-https-agent-create-connection.js index 267030232dcf9b..d13e805bc5a928 100644 --- a/test/parallel/test-https-agent-create-connection.js +++ b/test/parallel/test-https-agent-create-connection.js @@ -1,6 +1,7 @@ 'use strict'; const common = require('../common'); +const fixtures = require('../common/fixtures'); if (!common.hasCrypto) common.skip('missing crypto'); @@ -9,11 +10,9 @@ const https = require('https'); const agent = new https.Agent(); -const fs = require('fs'); - 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 expectedHeader = /^HTTP\/1\.1 200 OK/; From 77fab8d098ccd11f23aee2976972b5e4ab914688 Mon Sep 17 00:00:00 2001 From: Greg Byram Date: Fri, 6 Oct 2017 17:04:32 -0400 Subject: [PATCH 2/2] test: switch to use fixtures read key in http agent create connection test. --- test/parallel/test-https-agent-create-connection.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-https-agent-create-connection.js b/test/parallel/test-https-agent-create-connection.js index d13e805bc5a928..4ad3554f791524 100644 --- a/test/parallel/test-https-agent-create-connection.js +++ b/test/parallel/test-https-agent-create-connection.js @@ -11,8 +11,8 @@ const https = require('https'); const agent = new https.Agent(); const options = { - key: fixtures.readSync('keys/agent1-key.pem'), - cert: fixtures.readSync('keys/agent1-cert.pem'), + key: fixtures.readKey('agent1-key.pem'), + cert: fixtures.readKey('agent1-cert.pem'), }; const expectedHeader = /^HTTP\/1\.1 200 OK/;