test: replace fixturesDir with common.fixtures
PR-URL: https://github.com/nodejs/node/pull/15837 Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
This commit is contained in:
parent
1c97fa76f3
commit
d2c0978831
@ -24,14 +24,14 @@ const common = require('../common');
|
||||
if (!common.hasCrypto)
|
||||
common.skip('missing crypto');
|
||||
|
||||
const fixtures = require('../common/fixtures');
|
||||
|
||||
const assert = require('assert');
|
||||
const https = require('https');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const options = {
|
||||
key: fs.readFileSync(path.join(common.fixturesDir, 'test_key.pem')),
|
||||
cert: fs.readFileSync(path.join(common.fixturesDir, 'test_cert.pem'))
|
||||
key: fixtures.readSync('test_key.pem'),
|
||||
cert: fixtures.readSync('test_cert.pem')
|
||||
};
|
||||
|
||||
const server = https.createServer(options, common.mustCall(function(req, res) {
|
||||
@ -72,7 +72,7 @@ function rejectUnauthorized() {
|
||||
function authorized() {
|
||||
const options = {
|
||||
port: server.address().port,
|
||||
ca: [fs.readFileSync(path.join(common.fixturesDir, 'test_cert.pem'))]
|
||||
ca: [fixtures.readSync('test_cert.pem')]
|
||||
};
|
||||
options.agent = new https.Agent(options);
|
||||
const req = https.request(options, function(res) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user