From d0966927aa15bfecb47fac466fa99ceed99c6bcf Mon Sep 17 00:00:00 2001 From: Kat Rosario Date: Sat, 7 Oct 2017 01:57:13 +0900 Subject: [PATCH 1/2] Replaced common.fixturesDir with common.fixtures --- test/parallel/test-https-foafssl.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/parallel/test-https-foafssl.js b/test/parallel/test-https-foafssl.js index d8beefc22b252f..a5fe6b1ef30571 100644 --- a/test/parallel/test-https-foafssl.js +++ b/test/parallel/test-https-foafssl.js @@ -21,6 +21,7 @@ 'use strict'; const common = require('../common'); +const fixtures = require('../common/fixtures'); if (!common.hasCrypto) common.skip('missing crypto'); @@ -34,8 +35,8 @@ const spawn = require('child_process').spawn; const https = require('https'); const options = { - key: fs.readFileSync(`${common.fixturesDir}/agent.key`), - cert: fs.readFileSync(`${common.fixturesDir}/agent.crt`), + key: fs.readFileSync(`${fixtures.fixturesDir}/agent.key`), + cert: fs.readFileSync(`${fixtures.fixturesDir}/agent.crt`), requestCert: true, rejectUnauthorized: false }; @@ -70,8 +71,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', join(fixtures.fixturesDir, 'foafssl.crt'), + '-key', join(fixtures.fixturesDir, 'foafssl.key')]; // for the performance and stability issue in s_client on Windows if (common.isWindows) From e2f4a270543200cbb459c5fcaf4365c29d4f7ed5 Mon Sep 17 00:00:00 2001 From: Kat Rosario Date: Wed, 11 Oct 2017 19:51:07 +0900 Subject: [PATCH 2/2] test: change fixturesDir to readSync and path --- test/parallel/test-https-foafssl.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/test/parallel/test-https-foafssl.js b/test/parallel/test-https-foafssl.js index a5fe6b1ef30571..c88a7c0e845f53 100644 --- a/test/parallel/test-https-foafssl.js +++ b/test/parallel/test-https-foafssl.js @@ -29,14 +29,12 @@ 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 https = require('https'); const options = { - key: fs.readFileSync(`${fixtures.fixturesDir}/agent.key`), - cert: fs.readFileSync(`${fixtures.fixturesDir}/agent.crt`), + key: fixtures.readSync('agent.key'), + cert: fixtures.readSync('agent.crt'), requestCert: true, rejectUnauthorized: false }; @@ -71,8 +69,8 @@ server.listen(0, function() { const args = ['s_client', '-quiet', '-connect', `127.0.0.1:${this.address().port}`, - '-cert', join(fixtures.fixturesDir, 'foafssl.crt'), - '-key', join(fixtures.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)