-
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: test-tls-fast-writing replace common.fixturesDir #15808
Conversation
@@ -20,6 +20,7 @@ | |||
// USE OR OTHER DEALINGS IN THE SOFTWARE. | |||
|
|||
'use strict'; | |||
const fixtures = require('../common/fixtures'); | |||
const common = require('../common'); |
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
should be the first thing require()
'ed.
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.
I've fixed this
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 with the nit addressed.
const assert = require('assert'); | ||
const tls = require('tls'); | ||
const fs = require('fs'); | ||
|
||
const dir = common.fixturesDir; | ||
const dir = fixtures.fixturesDir; | ||
const options = { key: fs.readFileSync(`${dir}/test_key.pem`), | ||
cert: fs.readFileSync(`${dir}/test_cert.pem`), | ||
ca: [ fs.readFileSync(`${dir}/test_ca.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.
If you replace the three readFileSyncs
(e.g. fs.readFileSync(
with ${dir}/test_ca.pem
)fixtures.readSync('test_ca.pem')
) you can remove the const dir
line, and probably the require('fs')
as well, although make lint
will tell you that.
If you could push a commit to your branch making that change that'd be great!
Docs here: https://github.com/nodejs/node/tree/master/test/common#fixturesreadsyncargs-enc
Replace common.fixturesDir with fixtures module usage in test/parallel/test-tls-fast-writing.js. PR-URL: nodejs#15808 Reviewed-By: Ryan Graham <r.m.graham@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Landed in 2b76b5d. |
Replace common.fixturesDir with fixtures module usage in test/parallel/test-tls-fast-writing.js. PR-URL: nodejs/node#15808 Reviewed-By: Ryan Graham <r.m.graham@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Replace common.fixturesDir with fixtures module usage in test/parallel/test-tls-fast-writing.js. PR-URL: #15808 Reviewed-By: Ryan Graham <r.m.graham@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Replace common.fixturesDir with fixtures module usage in test/parallel/test-tls-fast-writing.js. PR-URL: #15808 Reviewed-By: Ryan Graham <r.m.graham@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Replace common.fixturesDir with fixtures module usage in test/parallel/test-tls-fast-writing.js. PR-URL: #15808 Reviewed-By: Ryan Graham <r.m.graham@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Replace common.fixturesDir with fixtures module usage in test/parallel/test-tls-fast-writing.js. PR-URL: #15808 Reviewed-By: Ryan Graham <r.m.graham@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
In
test-tls-fast-writing
I used the common/fixtures module to referencefixturesDir
rather than the common/index moduleChecklist
make -j4 test
(UNIX) passesAffected core subsystem(s)
test