From 4ab37ea134152a263f06c7d7fe61251b7157f1cc Mon Sep 17 00:00:00 2001 From: Kat Rosario Date: Sat, 7 Oct 2017 01:57:13 +0900 Subject: [PATCH] test: use common fixtures module Replace use of fixturesDir with fixtures.readSync and fixtures.path. PR-URL: https://github.com/nodejs/node/pull/15856 Reviewed-By: Rich Trott Reviewed-By: Luigi Pinca --- test/parallel/test-https-foafssl.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/test/parallel/test-https-foafssl.js b/test/parallel/test-https-foafssl.js index 06ef1e1bd52fb4..2025597abbded0 100644 --- a/test/parallel/test-https-foafssl.js +++ b/test/parallel/test-https-foafssl.js @@ -7,15 +7,15 @@ if (!common.opensslCli) common.skip('node compiled without OpenSSL CLI.'); const assert = require('assert'); -const join = require('path').join; -const fs = require('fs'); -const spawn = require('child_process').spawn; +const fixtures = require('../common/fixtures'); const https = require('https'); +const spawn = require('child_process').spawn; const options = { - key: fs.readFileSync(`${common.fixturesDir}/agent.key`), - cert: fs.readFileSync(`${common.fixturesDir}/agent.crt`), - requestCert: true + key: fixtures.readSync('agent.key'), + cert: fixtures.readSync('agent.crt'), + requestCert: true, + rejectUnauthorized: false }; const modulus = 'A6F44A9C25791431214F5C87AF9E040177A8BB89AC803F7E09BBC3A5519F' + @@ -48,8 +48,8 @@ server.listen(0, function() { const args = ['s_client', '-quiet', '-connect', `127.0.0.1:${this.address().port}`, - '-cert', join(common.fixturesDir, 'foafssl.crt'), - '-key', join(common.fixturesDir, 'foafssl.key')]; + '-cert', fixtures.path('foafssl.crt'), + '-key', fixtures.path('foafssl.key')]; // for the performance and stability issue in s_client on Windows if (common.isWindows)