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

Conversation

frkat
Copy link
Contributor

@frkat frkat commented Oct 6, 2017

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Oct 6, 2017
@mscdex mscdex added the https Issues or PRs related to the https subsystem. label Oct 6, 2017
@Trott Trott added the code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. label Oct 6, 2017
@Trott
Copy link
Member

Trott commented Oct 8, 2017

Hi, @frkat! Welcome and thanks for this! Can you update this to use fixtures.readSync() instead of fixtures.fixturesDir? See documentation at https://github.com/nodejs/node/tree/master/test/common#fixtures-module

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 👍

'-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 👍

@frkat
Copy link
Contributor Author

frkat commented Oct 11, 2017

Updated the code, please check again - thanks!

@Trott
Copy link
Member

Trott commented Oct 12, 2017

@@ -21,21 +21,20 @@

'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.

Trott pushed a commit to Trott/io.js that referenced this pull request Oct 12, 2017
Replace use of fixturesDir with fixtures.readSync and fixtures.path.

PR-URL: nodejs#15856
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
@Trott
Copy link
Member

Trott commented Oct 12, 2017

Landed in 668f4cf. Handled @lpinca's nit while landing.

@Trott Trott closed this Oct 12, 2017
@Trott
Copy link
Member

Trott commented Oct 12, 2017

Thanks for the contribution! 🎉

addaleax pushed a commit to ayojs/ayo that referenced this pull request Oct 15, 2017
Replace use of fixturesDir with fixtures.readSync and fixtures.path.

PR-URL: nodejs/node#15856
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
targos pushed a commit that referenced this pull request Oct 18, 2017
Replace use of fixturesDir with fixtures.readSync and fixtures.path.

PR-URL: #15856
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
MylesBorins pushed a commit that referenced this pull request Nov 16, 2017
Replace use of fixturesDir with fixtures.readSync and fixtures.path.

PR-URL: #15856
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Nov 21, 2017
MylesBorins pushed a commit that referenced this pull request Nov 21, 2017
Replace use of fixturesDir with fixtures.readSync and fixtures.path.

PR-URL: #15856
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
MylesBorins pushed a commit that referenced this pull request Nov 28, 2017
Replace use of fixturesDir with fixtures.readSync and fixtures.path.

PR-URL: #15856
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. https Issues or PRs related to the https subsystem. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants