Skip to content
This repository was archived by the owner on Aug 31, 2018. It is now read-only.

Commit 134a441

Browse files
frkataddaleax
authored andcommitted
test: use common fixtures module
Replace use of fixturesDir with fixtures.readSync and fixtures.path. PR-URL: nodejs/node#15856 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 2553050 commit 134a441

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

test/parallel/test-https-foafssl.js

+6-7
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,13 @@ if (!common.opensslCli)
2828
common.skip('node compiled without OpenSSL CLI.');
2929

3030
const assert = require('assert');
31-
const join = require('path').join;
32-
const fs = require('fs');
33-
const spawn = require('child_process').spawn;
31+
const fixtures = require('../common/fixtures');
3432
const https = require('https');
33+
const spawn = require('child_process').spawn;
3534

3635
const options = {
37-
key: fs.readFileSync(`${common.fixturesDir}/agent.key`),
38-
cert: fs.readFileSync(`${common.fixturesDir}/agent.crt`),
36+
key: fixtures.readSync('agent.key'),
37+
cert: fixtures.readSync('agent.crt'),
3938
requestCert: true,
4039
rejectUnauthorized: false
4140
};
@@ -70,8 +69,8 @@ server.listen(0, function() {
7069
const args = ['s_client',
7170
'-quiet',
7271
'-connect', `127.0.0.1:${this.address().port}`,
73-
'-cert', join(common.fixturesDir, 'foafssl.crt'),
74-
'-key', join(common.fixturesDir, 'foafssl.key')];
72+
'-cert', fixtures.path('foafssl.crt'),
73+
'-key', fixtures.path('foafssl.key')];
7574

7675
// for the performance and stability issue in s_client on Windows
7776
if (common.isWindows)

0 commit comments

Comments
 (0)