Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: replace common.fixturesDir with usage of common.fixtures module #15837

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down