Skip to content
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: remove unused variables from TLS tests #4424

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion test/parallel/test-tls-0-dns-altname.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ if (!common.hasCrypto) {
var tls = require('tls');

var fs = require('fs');
var net = require('net');

var common = require('../common');

Expand Down
1 change: 0 additions & 1 deletion test/parallel/test-tls-async-cb-after-socket-end.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

var common = require('../common');

var assert = require('assert');
var path = require('path');
var fs = require('fs');
var constants = require('constants');
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-tls-client-default-ciphers.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function test1() {
};

try {
var s = tls.connect(common.PORT);
tls.connect(common.PORT);
} catch (e) {
assert(e instanceof Done);
}
Expand Down
1 change: 0 additions & 1 deletion test/parallel/test-tls-close-error.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ if (!common.hasCrypto) {
var tls = require('tls');

var fs = require('fs');
var net = require('net');

var errorCount = 0;
var closeCount = 0;
Expand Down
1 change: 0 additions & 1 deletion test/parallel/test-tls-close-notify.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ if (!common.hasCrypto) {
var tls = require('tls');

var fs = require('fs');
var net = require('net');

var ended = 0;

Expand Down
1 change: 0 additions & 1 deletion test/parallel/test-tls-connect-secure-context.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
'use strict';
const common = require('../common');
const assert = require('assert');

if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
Expand Down
1 change: 0 additions & 1 deletion test/parallel/test-tls-destroy-whilst-write.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
'use strict';
var assert = require('assert');
var common = require('../common');

if (!common.hasCrypto) {
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-tls-fast-writing.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ var server = tls.createServer(options, onconnection);
var gotChunk = false;
var gotDrain = false;

var timer = setTimeout(function() {
setTimeout(function() {
console.log('not ok - timed out');
process.exit(1);
}, common.platformTimeout(500));
Expand Down
1 change: 0 additions & 1 deletion test/parallel/test-tls-handshake-error.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ if (!common.hasCrypto) {
var tls = require('tls');

var fs = require('fs');
var net = require('net');

var errorCount = 0;
var closeCount = 0;
Expand Down
1 change: 0 additions & 1 deletion test/parallel/test-tls-handshake-nohang.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
'use strict';
var common = require('../common');
var assert = require('assert');

if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
Expand Down
1 change: 0 additions & 1 deletion test/parallel/test-tls-invoke-queued.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ if (!common.hasCrypto) {
var tls = require('tls');

var fs = require('fs');
var net = require('net');


var received = '';
Expand Down
2 changes: 0 additions & 2 deletions test/parallel/test-tls-key-mismatch.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ var options = {
cert: fs.readFileSync(common.fixturesDir + '/keys/agent2-cert.pem')
};

var cert = null;

assert.throws(function() {
tls.createSecureContext(options);
});
4 changes: 0 additions & 4 deletions test/parallel/test-tls-legacy-onselect.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ function filenamePEM(n) {
return require('path').join(common.fixturesDir, 'keys', n + '.pem');
}

function loadPEM(n) {
return fs.readFileSync(filenamePEM(n));
}

var server = net.Server(function(raw) {
var pair = tls.createSecurePair(null, true, false, false);
pair.on('error', function() {});
Expand Down
1 change: 0 additions & 1 deletion test/parallel/test-tls-max-send-fragment.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ if (!common.hasCrypto) {
var tls = require('tls');

var fs = require('fs');
var net = require('net');

var common = require('../common');

Expand Down
1 change: 0 additions & 1 deletion test/parallel/test-tls-ocsp-callback.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ function test(testOptions, cb) {
var clientSecure = 0;
var ocspCount = 0;
var ocspResponse;
var session;

if (testOptions.pfx) {
delete options.key;
Expand Down
1 change: 0 additions & 1 deletion test/parallel/test-tls-peer-certificate-encoding.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ var tls = require('tls');
var fs = require('fs');
var util = require('util');
var join = require('path').join;
var spawn = require('child_process').spawn;

var options = {
key: fs.readFileSync(join(common.fixturesDir, 'keys', 'agent5-key.pem')),
Expand Down
1 change: 0 additions & 1 deletion test/parallel/test-tls-peer-certificate-multi-keys.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ var tls = require('tls');
var fs = require('fs');
var util = require('util');
var join = require('path').join;
var spawn = require('child_process').spawn;

var options = {
key: fs.readFileSync(join(common.fixturesDir, 'agent.key')),
Expand Down
1 change: 0 additions & 1 deletion test/parallel/test-tls-peer-certificate.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ var tls = require('tls');
var fs = require('fs');
var util = require('util');
var join = require('path').join;
var spawn = require('child_process').spawn;

var options = {
key: fs.readFileSync(join(common.fixturesDir, 'keys', 'agent1-key.pem')),
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-tls-request-timeout.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ var server = tls.Server(options, function(socket) {
});

server.listen(common.PORT, function() {
var socket = tls.connect({
tls.connect({
port: common.PORT,
rejectUnauthorized: false
});
Expand Down
1 change: 0 additions & 1 deletion test/parallel/test-tls-socket-default-options.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ if (!common.hasCrypto) {
const tls = require('tls');

const fs = require('fs');
const net = require('net');

const sent = 'hello world';

Expand Down
1 change: 0 additions & 1 deletion test/parallel/test-tls-ticket-cluster.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ if (cluster.isMaster) {

function fork() {
var worker = cluster.fork();
var workerReqCount = 0;
worker.on('message', function(msg) {
console.error('[master] got %j', msg);
if (msg === 'reused') {
Expand Down