-
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: refactor test-tls-env-extra-ca #13886
Conversation
|
||
if (process.env.CHILD) { | ||
const copts = { | ||
port: process.env.PORT, | ||
checkServerIdentity: common.noop, | ||
checkServerIdentity: common.mustCall(), | ||
}; | ||
const client = tls.connect(copts, function() { |
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.
Should this be common.mustCall()
?
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.
Also for tls.createServer()
below.
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.
@richardlau Yes to both. Good catch. Added! Thanks.
const tls = require('tls'); | ||
|
||
const fork = require('child_process').fork; |
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.
Should this also be reordered?
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 put it separate from the rest because of the .fork
appended to the end. I think our test writing guidelines might be ambiguous on this situation. ¯\(ツ)/¯
* Use `common.mustCall()` to guarantee callback invocations * Order modules according to test writing guide
3714d52
to
7552cc3
Compare
Landed in 062c414 |
* Use `common.mustCall()` to guarantee callback invocations * Order modules according to test writing guide PR-URL: nodejs#13886 Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
* Use `common.mustCall()` to guarantee callback invocations * Order modules according to test writing guide PR-URL: #13886 Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
* Use `common.mustCall()` to guarantee callback invocations * Order modules according to test writing guide PR-URL: #13886 Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
* Use `common.mustCall()` to guarantee callback invocations * Order modules according to test writing guide PR-URL: #13886 Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
* Use `common.mustCall()` to guarantee callback invocations * Order modules according to test writing guide PR-URL: #13886 Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
* Use `common.mustCall()` to guarantee callback invocations * Order modules according to test writing guide PR-URL: #13886 Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
* Use `common.mustCall()` to guarantee callback invocations * Order modules according to test writing guide PR-URL: #13886 Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
common.mustCall()
to guarantee noop function is calledChecklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
test tls