Skip to content

Commit

Permalink
test: use common fixtures module
Browse files Browse the repository at this point in the history
Replace use of fixturesDir with fixtures.readSync and fixtures.path.

PR-URL: #15856
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
  • Loading branch information
frkat authored and Trott committed Oct 12, 2017
1 parent d9f8736 commit 668f4cf
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions test/parallel/test-https-foafssl.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
};
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 668f4cf

Please sign in to comment.