summaryrefslogtreecommitdiff
path: root/test/parallel/test-http-unix-socket.js
AgeCommit message (Collapse)Author
2018-01-31test: move tmpdir to submodule of commonRich Trott
Move tmpdir functionality to its own module (common/tmpdir). PR-URL: https://github.com/nodejs/node/pull/17856 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2017-12-24net: migrate errors to internal/errorskysnm
Throw ERR_SOCKET_CLOSED and ERR_SERVER_NOT_RUNNING instead of the old-style errors in net.js. PR-URL: https://github.com/nodejs/node/pull/17766 Refs: https://github.com/nodejs/node/issues/17709 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-04-12test: remove common.fail()Rich Trott
common.fail() was added to paste over issues with assert.fail() function signature. assert.fail() has been updated to accept a single argument so common.fail() is no longer necessary. PR-URL: https://github.com/nodejs/node/pull/12293 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-03-10meta: restore original copyright headerJames M Snell
A prior io.js era commit inappropriately removed the original copyright statements from the source. This restores those in any files still remaining from that edit. Ref: https://github.com/nodejs/TSC/issues/174 Ref: https://github.com/nodejs/node/pull/10599 PR-URL: https://github.com/nodejs/node/pull/10155 Note: This PR was required, reviewed-by and approved by the Node.js Foundation Legal Committee and the TSC. There is no `Approved-By:` meta data.
2017-01-11test: use eslint to fix var->const/letGibson Fahnestock
Manually fix issues that eslint --fix couldn't do automatically. PR-URL: https://github.com/nodejs/node/pull/10685 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
2016-12-08test: refactor test-http-unix-socketdavidmarkclements
Use `common.mustCall()` and `common.fail()` where appropriate. Change `assert.equal` to `assert.strictEqual` to ensure specificity. Change var declarations to const to take advantage of ES6 immutable bindings. PR-URL: https://github.com/nodejs/node/pull/10072 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2016-07-18test: use mustCall() for simple flow trackingcjihrig
Many of the tests use variables to track when callback functions are invoked or events are emitted. These variables are then asserted on process exit. This commit replaces this pattern in straightforward cases with common.mustCall(). This makes the tests easier to reason about, leads to a net reduction in lines of code, and uncovered a few bugs in tests. This commit also replaces some callbacks that should never be called with common.fail(). PR-URL: https://github.com/nodejs/node/pull/7753 Reviewed-By: Wyatt Preul <wpreul@gmail.com> Reviewed-By: Minwoo Jung <jmwsoft@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-12-28test: remove unused variables form http testsRich Trott
The http tests seem especially prone to including unused variables. This change removes them. PR-URL: https://github.com/nodejs/node/pull/4422 Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
2015-10-08test: refresh temp directory when using pipeRich Trott
common.PIPE resides in the temp directory (except on Windows). Insure that the temp directory is refreshed in tests that use common.PIPE. PR-URL: https://github.com/nodejs/node/pull/3231 Fixes: https://github.com/nodejs/node/issues/3227 Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
2015-08-28Revert "lib,src: add unix socket getsockname/getpeername"Ben Noordhuis
This reverts commit 6cd0e2664b1ce944e5e461457d160be83f70d379. This reverts commit 7a999a13766ac68049812fedbdfd15a0250f0f07. This reverts commit f337595441641ad36f6ab8ae770e56c1673ef692. It turns out that on Windows, uv_pipe_getsockname() is a no-op for client sockets. It slipped through testing because of a CI snafu. PR-URL: https://github.com/nodejs/node/pull/2584 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2015-08-27lib,src: add unix socket getsockname/getpeernameBen Noordhuis
The implementation is a minor API change in that socket.address() now returns a `{ address: '/path/to/socket' }` object, like it does for TCP and UDP sockets. Before this commit, it returned `socket._pipeName`, which is a string when present. Change common.PIPE on Windows from '\\\\.\\pipe\\libuv-test' to '\\\\?\\pipe\\libuv-test'. Windows converts the '.' to a '?' when creating a named pipe, meaning that common.PIPE didn't match the result from NtQueryInformationFile(). Fixes: https://github.com/nodejs/node/issues/954 PR-URL: https://github.com/nodejs/node/pull/956 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-05-19test: enable linting for testsRoman Reiss
Enable linting for the test directory. A number of changes was made so all tests conform the current rules used by lib and src directories. The only exception for tests is that unreachable (dead) code is allowed. test-fs-non-number-arguments-throw had to be excluded from the changes because of a weird issue on Windows CI. PR-URL: https://github.com/nodejs/io.js/pull/1721 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-01-12Remove excessive copyright/license boilerplateisaacs
The copyright and license notice is already in the LICENSE file. There is no justifiable reason to also require that it be included in every file, since the individual files are not individually distributed except as part of the entire package.
2014-12-17test: split test in parallel/sequentialFedor Indutny
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> PR-URL: https://github.com/iojs/io.js/pull/172 Fix: iojs/io.js#139