From e1c45efdbb464b967a95316a964ce1d13e99bb2e Mon Sep 17 00:00:00 2001 From: Greg Byram Date: Fri, 6 Oct 2017 12:56:47 -0400 Subject: [PATCH] test: use fixtures.readKey in https-agent test PR-URL: https://github.com/nodejs/node/pull/15913 Reviewed-By: Gibson Fahnestock Reviewed-By: Colin Ihrig --- 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 a7c329bd5373ca..6cfca5edbc3d12 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.readKey('agent1-key.pem'), + cert: fixtures.readKey('agent1-cert.pem'), }; const expectedHeader = /^HTTP\/1.1 200 OK/;