-
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: replaces fixturesDir with fixtures #15835
Conversation
e5c0958
to
09afadb
Compare
behold, my first commit to node.js coming from node interactive in Vancouver. this commit updates the common.fixturesDir method in the https-timeout test.
09afadb
to
dc66f9e
Compare
test/parallel/test-https-timeout.js
Outdated
@@ -30,8 +30,8 @@ const https = require('https'); | |||
const fs = require('fs'); | |||
|
|||
const options = { | |||
key: fs.readFileSync(`${common.fixturesDir}/keys/agent1-key.pem`), | |||
cert: fs.readFileSync(`${common.fixturesDir}/keys/agent1-cert.pem`) | |||
key: fs.readFileSync(`${common.fixtures}/keys/agent1-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.
common
module does not export fixtures. This should be using method fixtures.readKey
to get keys.
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.
Yeah, this is not quite correct. The change would be first to:
const fixtures = require('../common/fixtures');
Then...
const options = {
key: fixtures.readKey('agent1-key.pem'),
cert: fixtures.readKey('agent1-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.
Thank you very much for participating in the code-and-learn! We appreciate the contribution!
There are a couple of things that need to be corrected about this PR. You can do so by making the changes suggested below and adding a new commit to your development branch.
test/parallel/test-https-timeout.js
Outdated
@@ -30,8 +30,8 @@ const https = require('https'); | |||
const fs = require('fs'); | |||
|
|||
const options = { | |||
key: fs.readFileSync(`${common.fixturesDir}/keys/agent1-key.pem`), | |||
cert: fs.readFileSync(`${common.fixturesDir}/keys/agent1-cert.pem`) | |||
key: fs.readFileSync(`${common.fixtures}/keys/agent1-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.
Yeah, this is not quite correct. The change would be first to:
const fixtures = require('../common/fixtures');
Then...
const options = {
key: fixtures.readKey('agent1-key.pem'),
cert: fixtures.readKey('agent1-cert.pem')
}
/cc ping @mikemfleming to see if they can make the suggested changes. |
Just saw this, working on it now! |
test/parallel/test-https-timeout.js
Outdated
@@ -21,6 +21,7 @@ | |||
|
|||
'use strict'; | |||
const common = require('../common'); | |||
const fixtures = require('../common/fixtures'); |
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.
@ mikemfleming - on a second look, I guess this require statement can move down the line, after the hasCrypto check.
test/parallel/test-https-timeout.js
Outdated
@@ -30,8 +31,8 @@ const https = require('https'); | |||
const fs = require('fs'); |
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.
@ mikemfleming - on a second look, the requiring of fs module is not used anywhere in the test, and I guess is likely to invite linter error. Will you remove this please?
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.
Just removed it
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.
thanks!
fcb3052
to
d35adde
Compare
Landed in 3043937, thank you for the contribution! |
This commit updates the common.fixturesDir method in the https-timeout test. PR-URL: #15835 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
This commit updates the common.fixturesDir method in the https-timeout test. PR-URL: nodejs/node#15835 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
This commit updates the common.fixturesDir method in the https-timeout test. PR-URL: #15835 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
This commit updates the common.fixturesDir method in the https-timeout test. PR-URL: #15835 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
This commit updates the common.fixturesDir method in the https-timeout test. PR-URL: #15835 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
This commit updates the common.fixturesDir method in the https-timeout test. PR-URL: #15835 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)