From 207b24a75e5a23b58e960effe9852430cacdddbe Mon Sep 17 00:00:00 2001 From: Dara Hayes Date: Mon, 6 Nov 2017 15:23:13 +0000 Subject: [PATCH] test: update test to use fixtures.readKey Use fixtures.readKey() rather than common.fixturesDir in test-regress-GH-1531. PR-URL: https://github.com/nodejs/node/pull/16811 Reviewed-By: Colin Ihrig Reviewed-By: Anatoli Papirovski Reviewed-By: Gireesh Punathil Reviewed-By: Rich Trott --- test/parallel/test-regress-GH-1531.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/test/parallel/test-regress-GH-1531.js b/test/parallel/test-regress-GH-1531.js index 7d1f4a0dbec4c1..a61cc64ab626af 100644 --- a/test/parallel/test-regress-GH-1531.js +++ b/test/parallel/test-regress-GH-1531.js @@ -1,16 +1,20 @@ 'use strict'; const common = require('../common'); +// This test ensures that a http request callback is called +// when the agent option is set +// See https://github.com/nodejs/node-v0.x-archive/issues/1531 + if (!common.hasCrypto) common.skip('missing crypto'); -const https = require('https'); +const fixtures = require('../common/fixtures'); -const fs = require('fs'); +const https = require('https'); 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 server = https.createServer(options, function(req, res) {