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 fixtures.path() #16802

Closed

Conversation

AdriVanHoudt
Copy link
Contributor

@AdriVanHoudt AdriVanHoudt commented Nov 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 Nov 6, 2017
Copy link
Contributor

@cjihrig cjihrig left a comment

Choose a reason for hiding this comment

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

LGTM with a suggestion.

@@ -14,8 +18,8 @@ const clientConfigs = [
];

const serverConfig = {
key: fs.readFileSync(`${common.fixturesDir}/keys/agent2-key.pem`),
cert: fs.readFileSync(`${common.fixturesDir}/keys/agent2-cert.pem`)
key: fs.readFileSync(fixtures.path('/keys/agent2-key.pem')),
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you use fixtures.readSync() instead?

@gireeshpunathil
Copy link
Member

Thanks! some suggestions:

  1. There is a fixtures.readSync() function that you can use instead of fs.readFileSync() that directly reads from the fixtures.path.

  2. Once you do that you may eliminate the need for fs module. (else linter breaks)

  3. You may untick tests and/or benchmarks are included option in the description, as you did not include any new.

@AdriVanHoudt
Copy link
Contributor Author

Fixed! Thanks for the quick feedback 👍

@mscdex mscdex added the tls Issues and PRs related to the tls subsystem. label Nov 6, 2017
@Trott
Copy link
Member

Trott commented Nov 6, 2017

@Trott Trott added the code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. label Nov 6, 2017
Trott pushed a commit to Trott/io.js that referenced this pull request Nov 6, 2017
Replace common.fixturesDir with fixtures.readSync() in
test-tls-getprotocol.

PR-URL: nodejs#16802
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
@Trott
Copy link
Member

Trott commented Nov 6, 2017

Landed in e232cd8.

Thanks for the contribution! 🎉

@Trott Trott closed this Nov 6, 2017
@AdriVanHoudt AdriVanHoudt deleted the test-tls-protocol-fixtures branch November 6, 2017 17:49
cjihrig pushed a commit to cjihrig/node that referenced this pull request Nov 6, 2017
Replace common.fixturesDir with fixtures.readSync() in
test-tls-getprotocol.

PR-URL: nodejs#16802
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
@cjihrig cjihrig mentioned this pull request Nov 6, 2017
MylesBorins pushed a commit that referenced this pull request Nov 16, 2017
Replace common.fixturesDir with fixtures.readSync() in
test-tls-getprotocol.

PR-URL: #16802
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
MylesBorins pushed a commit that referenced this pull request Nov 16, 2017
Replace common.fixturesDir with fixtures.readSync() in
test-tls-getprotocol.

PR-URL: #16802
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
@MylesBorins MylesBorins mentioned this pull request Nov 21, 2017
@gibfahn gibfahn mentioned this pull request Nov 21, 2017
MylesBorins pushed a commit that referenced this pull request Nov 21, 2017
Replace common.fixturesDir with fixtures.readSync() in
test-tls-getprotocol.

PR-URL: #16802
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
MylesBorins pushed a commit that referenced this pull request Nov 28, 2017
Replace common.fixturesDir with fixtures.readSync() in
test-tls-getprotocol.

PR-URL: #16802
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
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. test Issues and PRs related to the tests. tls Issues and PRs related to the tls subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants