From 643a2c6b1924ce2fdf8668b3fb6020c0d9ee794d Mon Sep 17 00:00:00 2001 From: Pooya Paridel Date: Fri, 6 Oct 2017 12:40:18 -0400 Subject: [PATCH] test: replace fixturesDir with common.fixtures PR-URL: https://github.com/nodejs/node/pull/15837 Reviewed-By: Gibson Fahnestock Reviewed-By: Refael Ackermann Reviewed-By: Colin Ihrig Reviewed-By: Benjamin Gruenbaum --- test/parallel/test-https-client-reject.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/parallel/test-https-client-reject.js b/test/parallel/test-https-client-reject.js index 8369e9ad21beb2..142218ab4b848b 100644 --- a/test/parallel/test-https-client-reject.js +++ b/test/parallel/test-https-client-reject.js @@ -3,14 +3,14 @@ const common = require('../common'); if (!common.hasCrypto) common.skip('missing crypto'); +const fixtures = require('../common/fixtures'); + const assert = require('assert'); const https = require('https'); -const fs = require('fs'); -const path = require('path'); const options = { - key: fs.readFileSync(path.join(common.fixturesDir, 'test_key.pem')), - cert: fs.readFileSync(path.join(common.fixturesDir, 'test_cert.pem')) + key: fixtures.readSync('test_key.pem'), + cert: fixtures.readSync('test_cert.pem') }; const server = https.createServer(options, common.mustCall(function(req, res) { @@ -51,7 +51,7 @@ function rejectUnauthorized() { function authorized() { const options = { port: server.address().port, - ca: [fs.readFileSync(path.join(common.fixturesDir, 'test_cert.pem'))] + ca: [fixtures.readSync('test_cert.pem')] }; options.agent = new https.Agent(options); const req = https.request(options, function(res) {