From 134a4412efb7b41bf2528dc7c419167739cb19f4 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 | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/test/parallel/test-https-foafssl.js b/test/parallel/test-https-foafssl.js index d8beefc22b..2a22bda60e 100644 --- a/test/parallel/test-https-foafssl.js +++ b/test/parallel/test-https-foafssl.js @@ -28,14 +28,13 @@ 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`), + key: fixtures.readSync('agent.key'), + cert: fixtures.readSync('agent.crt'), requestCert: true, rejectUnauthorized: false }; @@ -70,8 +69,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)