mirror of
https://github.com/nodejs/node.git
synced 2026-10-14 10:26:26 -04:00
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 <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
1 parent
d9f8736ffd
commit
668f4cff22
1 file changed
+6
-7
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user