-
Notifications
You must be signed in to change notification settings - Fork 30k
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
test: in test-tls-connect replace fixturedir w fixture mod #15849
Conversation
test/parallel/test-tls-connect.js
Outdated
@@ -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')); |
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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');
test/parallel/test-tls-connect.js
Outdated
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')); |
There was a problem hiding this comment.
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');
soft ping @cassandradanger |
Ping @cassandradanger |
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
I went ahead and pushed the changes suggested by @jasnell. Hope that was OK. This should be good to go. PTAL |
There was a problem hiding this 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
?
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]>
Landed in a70ef36. Thanks for the contribution! 🎉 |
@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. |
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]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>
fixes: code & learn 10.6 vancouver 1st task
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)