-
Notifications
You must be signed in to change notification settings - Fork 29.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: rename regression tests with descriptive file names
Rename the tests appropriately alongside mentioning the subsystem Also, make a few basic changes to make sure the tests conform to the standard test structure 1. Renamed test-regress-GH-io-1068 to test-tty-stdin-end 2. Renamed test-regress-GH-io-1811 to test-zlib-kmaxlength-rangeerror 3. Renamed test-regress-GH-node-9326 to test-kill-segfault-freebsd 4. Renamed test-timers-regress-GH-9765 to test-timers-setimmediate-infinite-loop 5. Renamed test-tls-pfx-gh-5100-regr to test-tls-pfx-authorizationerror 6. Renamed test-tls-regr-gh-5108 to test-tls-tlswrap-segfault Fixes: #19105 Refs: #19105 Refs: https://github.com/nodejs/node/blob/master/doc/guides/writing-tests.md#test-structure
- Loading branch information
Showing
8 changed files
with
64 additions
and
40 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
test/parallel/test-regress-GH-node-9326.js → test/parallel/test-kill-segfault-freebsd.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
'use strict'; | ||
const common = require('../common'); | ||
if (!common.hasCrypto) | ||
common.skip('node compiled without crypto.'); | ||
const fixtures = require('../common/fixtures'); | ||
|
||
// This test ensures that TLS does not fail to read a self-signed certificate | ||
// and thus throw an `authorizationError`. | ||
// https://github.com/nodejs/node/issues/5100 | ||
|
||
const assert = require('assert'); | ||
const tls = require('tls'); | ||
|
||
const pfx = fixtures.readKey('agent1-pfx.pem'); | ||
|
||
const server = tls | ||
.createServer( | ||
{ | ||
pfx: pfx, | ||
passphrase: 'sample', | ||
requestCert: true, | ||
rejectUnauthorized: false | ||
}, | ||
common.mustCall(function(c) { | ||
assert.strictEqual(c.authorizationError, null); | ||
c.end(); | ||
}) | ||
) | ||
.listen(0, function() { | ||
const client = tls.connect( | ||
{ | ||
port: this.address().port, | ||
pfx: pfx, | ||
passphrase: 'sample', | ||
rejectUnauthorized: false | ||
}, | ||
function() { | ||
client.end(); | ||
server.close(); | ||
} | ||
); | ||
}); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
'use strict'; | ||
require('../common'); | ||
|
||
// This test ensures that Node.js doesn't crash on `process.stdin.emit("end")`. | ||
// https://github.com/nodejs/node/issues/1068 | ||
|
||
process.stdin.emit('end'); |
6 changes: 5 additions & 1 deletion
6
test/parallel/test-regress-GH-io-1811.js → ...rallel/test-zlib-kmaxlength-rangeerror.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters