test: replaces fixturesDir with fixtures#15835
test: replaces fixturesDir with fixtures#15835mikemfleming wants to merge 3 commits intonodejs:masterfrom
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
| 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.
common module does not export fixtures. This should be using method fixtures.readKey to get keys.
There was a problem hiding this comment.
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')
}
jasnell
left a comment
There was a problem hiding this comment.
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
| 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.
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
|
|
||
| 'use strict'; | ||
| const common = require('../common'); | ||
| const fixtures = require('../common/fixtures'); |
There was a problem hiding this comment.
@ 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.
@ 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?
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 <jasnell@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit updates the common.fixturesDir method in the https-timeout test. PR-URL: nodejs/node#15835 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit updates the common.fixturesDir method in the https-timeout test. PR-URL: #15835 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit updates the common.fixturesDir method in the https-timeout test. PR-URL: #15835 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit updates the common.fixturesDir method in the https-timeout test. PR-URL: #15835 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit updates the common.fixturesDir method in the https-timeout test. PR-URL: #15835 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)