| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Replace lightly-used services file parsing in favor of confirming one of a small number of allowable values in service name lookup tests. In nodejs/node-v0.x-archive#8047, it was decided that this sort of service file parsing was superior to hardcoding acceptable values, but I'm not convinced: * No guarantee that the host uses /etc/services before, e.g., nscd. * Increases complexity of tests without guaranteeing robustness. I think that simply checking against a small set of expected values may be a better solution. Ideally, there would also be a unit test that used a test double for the appropriate `cares` function and confirms that it is called with the correct parameters, but now we're getting way ahead of ourselves.
|
LGTM |
Sorry, something went wrong.
|
LGTM |
Sorry, something went wrong.
|
LGTM |
Sorry, something went wrong.
Sorry, something went wrong.
|
One failure on CI but it is unrelated. Opened an issue for that and will land this momentarily... |
Sorry, something went wrong.
Replace lightly-used services file parsing in favor of confirming one of a small number of allowable values in service name lookup tests. In nodejs/node-v0.x-archive#8047, it was decided that this sort of service file parsing was superior to hardcoding acceptable values, but I'm not convinced: * No guarantee that the host uses /etc/services before, e.g., nscd. * Increases complexity of tests without guaranteeing robustness. I think that simply checking against a small set of expected values may be a better solution. Ideally, there would also be a unit test that used a test double for the appropriate `cares` function and confirms that it is called with the correct parameters, but now we're getting way ahead of ourselves. PR-URL: nodejs#6709 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Replace lightly-used services file parsing in favor of confirming one of a small number of allowable values in service name lookup tests. In nodejs/node-v0.x-archive#8047, it was decided that this sort of service file parsing was superior to hardcoding acceptable values, but I'm not convinced: * No guarantee that the host uses /etc/services before, e.g., nscd. * Increases complexity of tests without guaranteeing robustness. I think that simply checking against a small set of expected values may be a better solution. Ideally, there would also be a unit test that used a test double for the appropriate `cares` function and confirms that it is called with the correct parameters, but now we're getting way ahead of ourselves. PR-URL: #6709 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
| Back | FazBrowse Home | New Git URL |
Checklist
Affected core subsystem(s)
test dns
Description of change
Replace lightly-used services file parsing in favor of
confirming one of a small number of allowable values in service name
lookup tests.
In nodejs/node-v0.x-archive#8047, it was
decided that this sort of service file parsing was superior to
hardcoding acceptable values, but I'm not convinced:
I think that simply checking against a small set of expected values
may be a better solution. Ideally, there would also be a unit test that
used a test double for the appropriate cares function and confirms
that it is called with the correct parameters, but now we're getting way
ahead of ourselves.
@nodejs/test @nodejs/build @misterdjules