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: Replaced common.fixturesDir with common.fixtures (https-foafssl.js) #15856

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
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
9 changes: 5 additions & 4 deletions test/parallel/test-https-foafssl.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

'use strict';
const common = require('../common');
const fixtures = require('../common/fixtures');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: it would be great if you could move this after the common.skip() checks.

if (!common.hasCrypto)
common.skip('missing crypto');

Expand All @@ -34,8 +35,8 @@ const spawn = require('child_process').spawn;
const https = require('https');

const options = {
key: fs.readFileSync(`${common.fixturesDir}/agent.key`),
cert: fs.readFileSync(`${common.fixturesDir}/agent.crt`),
key: fs.readFileSync(`${fixtures.fixturesDir}/agent.key`),
cert: fs.readFileSync(`${fixtures.fixturesDir}/agent.crt`),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be:

key: fixtures.readSync('agent.key'),
cert: fixtures.readSync('agent.crt')

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, thanks 👍

requestCert: true,
rejectUnauthorized: false
};
Expand Down Expand Up @@ -70,8 +71,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', join(fixtures.fixturesDir, 'foafssl.crt'),
'-key', join(fixtures.fixturesDir, 'foafssl.key')];

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be:

'-cert', fixtures.path('foafssl.crt'),
'-key', fixtures.path('foafssl.key')

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, thanks 👍

// for the performance and stability issue in s_client on Windows
if (common.isWindows)
Expand Down