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: in test-tls-connect replace fixturedir w fixture mod #15849

Closed
wants to merge 1 commit into from
Closed

test: in test-tls-connect replace fixturedir w fixture mod #15849

wants to merge 1 commit into from

Conversation

cassandradanger
Copy link
Contributor

fixes: code & learn 10.6 vancouver 1st task

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

@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Oct 6, 2017
@cassandradanger cassandradanger changed the title test: in test-tls-connect replace fixturedir w foxture mod test: in test-tls-connect replace fixturedir w fixture mod Oct 6, 2017
@@ -33,8 +34,8 @@ const tls = require('tls');
// https://github.com/joyent/node/issues/1218
// uncatchable exception on TLS connection error
{
const cert = fs.readFileSync(path.join(common.fixturesDir, 'test_cert.pem'));
const key = fs.readFileSync(path.join(common.fixturesDir, 'test_key.pem'));
const cert = fs.readFileSync(path.join(fixtures, 'test_cert.pem'));
Copy link
Contributor

Choose a reason for hiding this comment

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

This will fail tests as you cannot path.join fixtures. Moreover, this could be using method fixtures.readSync instead of fs.readFileSync.

Copy link
Member

Choose a reason for hiding this comment

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

Hello @cassandradanger! Thank you for participating in the code and learn! This does have a few additional edits that will be necessary... specifically, the change here should be:

const cert = fixtures.readSync('test_cert.pem');
const key = fixtures.readSync('test_key.pem');

@mscdex mscdex added test Issues and PRs related to the tests. tls Issues and PRs related to the tls subsystem. and removed test Issues and PRs related to the tests. labels 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 7, 2017
const cert = fs.readFileSync(path.join(common.fixturesDir, 'test_cert.pem'));
const key = fs.readFileSync(path.join(common.fixturesDir, 'test_key.pem'));
const cert = fs.readFileSync(path.join(fixtures, 'test_cert.pem'));
const key = fs.readFileSync(path.join(fixtures, 'test_key.pem'));
Copy link
Member

Choose a reason for hiding this comment

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

Here it should be:

const cert = fixtures.readSync('test_cert.pem');
const key = fixtures.readSync('test_key.pem');

@gireeshpunathil
Copy link
Member

soft ping @cassandradanger

@BridgeAR
Copy link
Member

Ping @cassandradanger

@apapirovski
Copy link
Member

Hi @cassandradanger, would you like to follow up on this and make the requested changes so it can land in Node? Let me know if there's any clarifications needed. Thanks for helping us improve Node!

fixes: code & learn 10.6 vancouver 1st task
@Trott
Copy link
Member

Trott commented Oct 28, 2017

I went ahead and pushed the changes suggested by @jasnell. Hope that was OK.

This should be good to go. PTAL

CI: https://ci.nodejs.org/job/node-test-pull-request/11033/

Copy link
Member

@joyeecheung joyeecheung left a comment

Choose a reason for hiding this comment

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

LGTM. I wonder why aren't those files in fixtures/keys?

Trott pushed a commit to Trott/io.js that referenced this pull request Oct 29, 2017
Replace common.fixturesDir with fixtures module in test-tls-connect.

PR-URL: nodejs#15849
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
@Trott
Copy link
Member

Trott commented Oct 29, 2017

Landed in a70ef36.

Thanks for the contribution! 🎉

@Trott Trott closed this Oct 29, 2017
@tniessen
Copy link
Member

tniessen commented Oct 29, 2017

@cassandradanger The email address you used to commit the changes does not match your GitHub email address, so the commit cannot be associated with your account. Please add the email address you used to commit the changes to your account in the GitHub settings if you would like this change to be linked to your profile.

gibfahn pushed a commit that referenced this pull request Oct 30, 2017
Replace common.fixturesDir with fixtures module in test-tls-connect.

PR-URL: #15849
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
gibfahn pushed a commit that referenced this pull request Oct 30, 2017
Replace common.fixturesDir with fixtures module in test-tls-connect.

PR-URL: #15849
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
gibfahn pushed a commit that referenced this pull request Oct 31, 2017
Replace common.fixturesDir with fixtures module in test-tls-connect.

PR-URL: #15849
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
@gibfahn gibfahn mentioned this pull request Oct 31, 2017
Qard pushed a commit to ayojs/ayo that referenced this pull request Nov 2, 2017
Replace common.fixturesDir with fixtures module in test-tls-connect.

PR-URL: nodejs/node#15849
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Qard pushed a commit to ayojs/ayo that referenced this pull request Nov 2, 2017
Replace common.fixturesDir with fixtures module in test-tls-connect.

PR-URL: nodejs/node#15849
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
MylesBorins pushed a commit that referenced this pull request Nov 16, 2017
Replace common.fixturesDir with fixtures module in test-tls-connect.

PR-URL: #15849
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Nov 21, 2017
MylesBorins pushed a commit that referenced this pull request Nov 21, 2017
Replace common.fixturesDir with fixtures module in test-tls-connect.

PR-URL: #15849
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
MylesBorins pushed a commit that referenced this pull request Nov 28, 2017
Replace common.fixturesDir with fixtures module in test-tls-connect.

PR-URL: #15849
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
addaleax pushed a commit to ayojs/ayo that referenced this pull request Dec 7, 2017
Replace common.fixturesDir with fixtures module in test-tls-connect.

PR-URL: nodejs/node#15849
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Joyee Cheung <[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. 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.