node/test/internet
Rich Trott ccbc78cfc6 test: remove common.getServiceName()
Replace lightly-used services file parsing in favor of
confirming one of a small number of allowable values in service name
lookup tests.

In https://github.com/nodejs/node-v0.x-archive/issues/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: https://github.com/nodejs/node/pull/6709
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-05-17 08:52:44 -05:00
..
test-dgram-broadcast-multi-process.js test: abstract skip functionality to common 2016-05-17 08:51:40 -05:00
test-dgram-multicast-multi-process.js test: abstract skip functionality to common 2016-05-17 08:51:40 -05:00
test-dgram-send-cb-quelches-error.js buffer: add .from(), .alloc() and .allocUnsafe() 2016-03-16 08:34:02 -07:00
test-dns-cares-domains.js test: move dns test to test/internet 2016-03-25 21:26:57 -07:00
test-dns-ipv4.js test: remove common.getServiceName() 2016-05-17 08:52:44 -05:00
test-dns-ipv6.js test: remove common.getServiceName() 2016-05-17 08:52:44 -05:00
test-dns-txt-sigsegv.js test: remove unnecessary assignments 2015-12-26 18:00:02 -08:00
test-dns.js dns: add resolvePtr to query plain DNS PTR records 2016-02-08 17:30:38 +01:00
test-http-dns-fail.js test: remove unnecessary assignments 2015-12-26 18:00:02 -08:00
test-http-https-default-ports.js test: abstract skip functionality to common 2016-05-17 08:51:40 -05:00
test-net-connect-timeout.js test: remove unnecessary assignments 2015-12-26 18:00:02 -08:00
test-net-connect-unref.js test: remove unnecessary assignments 2015-12-26 18:00:02 -08:00
test-tls-connnect-cnnic.js test: abstract skip functionality to common 2016-05-17 08:51:40 -05:00
test-tls-connnect-melissadata.js test: abstract skip functionality to common 2016-05-17 08:51:40 -05:00
test-tls-reuse-host-from-socket.js test: abstract skip functionality to common 2016-05-17 08:51:40 -05:00
testcfg.py test: refactor to use common testcfg 2014-01-20 09:00:13 -08:00