Skip to content

Commit

Permalink
test: replace fixturesDir with common.fixtures
Browse files Browse the repository at this point in the history
PR-URL: #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>
  • Loading branch information
ParidelPooya authored and MylesBorins committed Nov 28, 2017
1 parent 14aee78 commit 643a2c6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/parallel/test-https-client-reject.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,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) {
Expand Down Expand Up @@ -51,7 +51,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) {
Expand Down

0 comments on commit 643a2c6

Please sign in to comment.