test: replace common.fixturesDir with common.fixtures module#15810
test: replace common.fixturesDir with common.fixtures module#15810kasimdoctor wants to merge 1 commit intonodejs:masterfrom
Conversation
There was a problem hiding this comment.
This could be using method fixtures.readKey instead of fs.readFileSync to get the keys.
There was a problem hiding this comment.
@pawelgolda Sure, but fixtures.readKey also requires an enc, not sure what to pass in there 🤔
There was a problem hiding this comment.
You can leave that param out empty.
There was a problem hiding this comment.
Nevermind, I see from the documentation that enc is indeed optional, so I will actually go ahead and make that change.
There was a problem hiding this comment.
@pawelgolda Doing that change breaks the test for some reason..
There was a problem hiding this comment.
It should definitely just be...
key: fixtures.readKey('agent1-key.pem'),
cert: fixtures.readKey('agent1-cert.pem')There was a problem hiding this comment.
@jasnell I get the following error when running the test with the code change you requested:
=== release test-tls-key-mismatch ===
Path: parallel/test-tls-key-mismatch
assert.js:45
throw new errors.AssertionError({
^
AssertionError [ERR_ASSERTION]: Missing expected exception.
at innerThrows (assert.js:683:7)
at Function.throws (assert.js:702:3)
at Object.<anonymous> (/src/repos/personal/node/test/parallel/test-tls-key-mismatch.js:41:8)
at Module._compile (module.js:599:30)
at Object.Module._extensions..js (module.js:610:10)
at Module.load (module.js:518:32)
at tryModuleLoad (module.js:481:12)
at Function.Module._load (module.js:473:3)
at Function.Module.runMain (module.js:640:10)
at startup (bootstrap_node.js:187:16)
Command: out/Release/node /src/repos/personal/node/test/parallel/test-tls-key-mismatch.jsThere was a problem hiding this comment.
@kasimdoctor make sure to use 'agent2-cert.pem' for the cert.
There was a problem hiding this comment.
@lpinca Thanks! That was a dumb mistake on my part 😄
There was a problem hiding this comment.
Nit: can you please move this after the common.hasCrypto check?
38aefae to
f79277d
Compare
f79277d to
c0b79a5
Compare
|
@jasnell @pawelgolda @lpinca Comments addressed. Please have a look again. Thanks! |
|
CI is green! |
PR-URL: #15810 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
|
|
Landed in 006fdb2 . Thanks for the contribution! |
PR-URL: #15810 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
PR-URL: nodejs/node#15810 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
PR-URL: #15810 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
PR-URL: #15810 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
PR-URL: #15810 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Action-> Replaced
common.fixturesDirintest-tls-key-mismatch.jswithcommon.fixturesmodulePushed as part of Node.js Interactive 2017 Code n Learn!
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
test