Skip to content

Commit

Permalink
tests: remove unused parser client option from all tests & helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
Salakar committed Feb 9, 2020
1 parent a513c8b commit 79927c5
Show file tree
Hide file tree
Showing 66 changed files with 149 additions and 172 deletions.
19 changes: 9 additions & 10 deletions test/auth.spec.js
Expand Up @@ -19,9 +19,9 @@ describe('client authentication', function () {

helper.allTests({
allConnections: true
}, function (parser, ip, args) {
}, function (ip, args) {

describe('using ' + parser + ' and ' + ip, function () {
describe('using ' + ip, function () {
var auth = 'porkchopsandwiches';
var client = null;

Expand Down Expand Up @@ -133,7 +133,7 @@ describe('client authentication', function () {
it('allows auth to be provided as config option for client', function (done) {
if (helper.redisProcess().spawnFailed()) this.skip();

var args = config.configureClient(parser, ip, {
var args = config.configureClient(ip, {
auth_pass: auth
});
client = redis.createClient.apply(null, args);
Expand All @@ -143,7 +143,7 @@ describe('client authentication', function () {
it('allows auth and no_ready_check to be provided as config option for client', function (done) {
if (helper.redisProcess().spawnFailed()) this.skip();

var args = config.configureClient(parser, ip, {
var args = config.configureClient(ip, {
password: auth,
no_ready_check: true
});
Expand All @@ -154,7 +154,7 @@ describe('client authentication', function () {
it('allows auth to be provided post-hoc with auth method', function (done) {
if (helper.redisProcess().spawnFailed()) this.skip();

var args = config.configureClient(parser, ip);
var args = config.configureClient(ip);
client = redis.createClient.apply(null, args);
client.auth(auth);
client.on('ready', done);
Expand Down Expand Up @@ -217,7 +217,7 @@ describe('client authentication', function () {
it('allows auth to be provided post-hoc with auth method again', function (done) {
if (helper.redisProcess().spawnFailed()) this.skip();

var args = config.configureClient(parser, ip, {
var args = config.configureClient(ip, {
auth_pass: auth
});
client = redis.createClient.apply(null, args);
Expand All @@ -229,7 +229,7 @@ describe('client authentication', function () {
it('does not allow any commands to be processed if not authenticated using no_ready_check true', function (done) {
if (helper.redisProcess().spawnFailed()) this.skip();

var args = config.configureClient(parser, ip, {
var args = config.configureClient(ip, {
no_ready_check: true
});
client = redis.createClient.apply(null, args);
Expand Down Expand Up @@ -258,7 +258,6 @@ describe('client authentication', function () {
if (helper.redisProcess().spawnFailed()) this.skip();
client = redis.createClient({
password: 'wrong_password',
parser: parser
});
client.once('error', function (err) {
assert.strictEqual(err.message, 'ERR invalid password');
Expand All @@ -269,7 +268,7 @@ describe('client authentication', function () {
it('pubsub working with auth', function (done) {
if (helper.redisProcess().spawnFailed()) this.skip();

var args = config.configureClient(parser, ip, {
var args = config.configureClient(ip, {
password: auth
});
client = redis.createClient.apply(null, args);
Expand Down Expand Up @@ -299,7 +298,7 @@ describe('client authentication', function () {
// returning the manipulated [error, result] from the callback.
// There should be a better solution though

var args = config.configureClient(parser, 'localhost', {
var args = config.configureClient('localhost', {
noReadyCheck: true
});
client = redis.createClient.apply(null, args);
Expand Down
4 changes: 2 additions & 2 deletions test/batch.spec.js
Expand Up @@ -7,9 +7,9 @@ var redis = config.redis;

describe("The 'batch' method", function () {

helper.allTests(function (parser, ip, args) {
helper.allTests(function (ip, args) {

describe('using ' + parser + ' and ' + ip, function () {
describe('using ' + ip, function () {

describe('when not connected', function () {
var client;
Expand Down
4 changes: 2 additions & 2 deletions test/commands/blpop.spec.js
Expand Up @@ -8,9 +8,9 @@ var intercept = require('intercept-stdout');

describe("The 'blpop' method", function () {

helper.allTests(function (parser, ip, args) {
helper.allTests(function (ip, args) {

describe('using ' + parser + ' and ' + ip, function () {
describe('using ' + ip, function () {
var client;
var bclient;

Expand Down
4 changes: 2 additions & 2 deletions test/commands/client.spec.js
Expand Up @@ -7,10 +7,10 @@ var redis = config.redis;

describe("The 'client' method", function () {

helper.allTests(function (parser, ip, args) {
helper.allTests(function (ip, args) {
var pattern = /addr=/;

describe('using ' + parser + ' and ' + ip, function () {
describe('using ' + ip, function () {
var client;

beforeEach(function (done) {
Expand Down
4 changes: 2 additions & 2 deletions test/commands/dbsize.spec.js
Expand Up @@ -8,9 +8,9 @@ var uuid = require('uuid');

describe("The 'dbsize' method", function () {

helper.allTests(function (parser, ip, args) {
helper.allTests(function (ip, args) {

describe('using ' + parser + ' and ' + ip, function () {
describe('using ' + ip, function () {
var key, value;

beforeEach(function () {
Expand Down
4 changes: 2 additions & 2 deletions test/commands/del.spec.js
Expand Up @@ -6,9 +6,9 @@ var redis = config.redis;

describe("The 'del' method", function () {

helper.allTests(function (parser, ip, args) {
helper.allTests(function (ip, args) {

describe('using ' + parser + ' and ' + ip, function () {
describe('using ' + ip, function () {
var client;

beforeEach(function (done) {
Expand Down
4 changes: 2 additions & 2 deletions test/commands/eval.spec.js
Expand Up @@ -8,9 +8,9 @@ var redis = config.redis;

describe("The 'eval' method", function () {

helper.allTests(function (parser, ip, args) {
helper.allTests(function (ip, args) {

describe('using ' + parser + ' and ' + ip, function () {
describe('using ' + ip, function () {
var client;
var source = "return redis.call('set', 'sha', 'test')";

Expand Down
4 changes: 2 additions & 2 deletions test/commands/exists.spec.js
Expand Up @@ -6,9 +6,9 @@ var redis = config.redis;

describe("The 'exists' method", function () {

helper.allTests(function (parser, ip, args) {
helper.allTests(function (ip, args) {

describe('using ' + parser + ' and ' + ip, function () {
describe('using ' + ip, function () {
var client;

beforeEach(function (done) {
Expand Down
4 changes: 2 additions & 2 deletions test/commands/expire.spec.js
Expand Up @@ -6,9 +6,9 @@ var redis = config.redis;

describe("The 'expire' method", function () {

helper.allTests(function (parser, ip, args) {
helper.allTests(function (ip, args) {

describe('using ' + parser + ' and ' + ip, function () {
describe('using ' + ip, function () {
var client;

beforeEach(function (done) {
Expand Down
4 changes: 2 additions & 2 deletions test/commands/flushdb.spec.js
Expand Up @@ -8,9 +8,9 @@ var uuid = require('uuid');

describe("The 'flushdb' method", function () {

helper.allTests(function (parser, ip, args) {
helper.allTests(function (ip, args) {

describe('using ' + parser + ' and ' + ip, function () {
describe('using ' + ip, function () {
var key, key2;

beforeEach(function () {
Expand Down
4 changes: 2 additions & 2 deletions test/commands/geoadd.spec.js
Expand Up @@ -6,9 +6,9 @@ var redis = config.redis;

describe("The 'geoadd' method", function () {

helper.allTests(function (parser, ip, args) {
helper.allTests(function (ip, args) {

describe('using ' + parser + ' and ' + ip, function () {
describe('using ' + ip, function () {
var client;

beforeEach(function (done) {
Expand Down
4 changes: 2 additions & 2 deletions test/commands/get.spec.js
Expand Up @@ -8,9 +8,9 @@ var uuid = require('uuid');

describe("The 'get' method", function () {

helper.allTests(function (parser, ip, args) {
helper.allTests(function (ip, args) {

describe('using ' + parser + ' and ' + ip, function () {
describe('using ' + ip, function () {
var key, value;

beforeEach(function () {
Expand Down
4 changes: 2 additions & 2 deletions test/commands/getset.spec.js
Expand Up @@ -8,9 +8,9 @@ var uuid = require('uuid');

describe("The 'getset' method", function () {

helper.allTests(function (parser, ip, args) {
helper.allTests(function (ip, args) {

describe('using ' + parser + ' and ' + ip, function () {
describe('using ' + ip, function () {
var key, value, value2;

beforeEach(function () {
Expand Down
6 changes: 3 additions & 3 deletions test/commands/hgetall.spec.js
Expand Up @@ -7,9 +7,9 @@ var redis = config.redis;

describe("The 'hgetall' method", function () {

helper.allTests(function (parser, ip, args) {
helper.allTests(function (ip, args) {

describe('using ' + parser + ' and ' + ip, function () {
describe('using ' + ip, function () {
var client;

describe('regular client', function () {
Expand Down Expand Up @@ -51,7 +51,7 @@ describe("The 'hgetall' method", function () {

describe('binary client', function () {
var client;
var args = config.configureClient(parser, ip, {
var args = config.configureClient(ip, {
return_buffers: true
});

Expand Down
4 changes: 2 additions & 2 deletions test/commands/hincrby.spec.js
Expand Up @@ -6,9 +6,9 @@ var redis = config.redis;

describe("The 'hincrby' method", function () {

helper.allTests(function (parser, ip, args) {
helper.allTests(function (ip, args) {

describe('using ' + parser + ' and ' + ip, function () {
describe('using ' + ip, function () {
var client;
var hash = 'test hash';

Expand Down
4 changes: 2 additions & 2 deletions test/commands/hlen.spec.js
Expand Up @@ -6,9 +6,9 @@ var redis = config.redis;

describe("The 'hlen' method", function () {

helper.allTests(function (parser, ip, args) {
helper.allTests(function (ip, args) {

describe('using ' + parser + ' and ' + ip, function () {
describe('using ' + ip, function () {
var client;

beforeEach(function (done) {
Expand Down
4 changes: 2 additions & 2 deletions test/commands/hmget.spec.js
Expand Up @@ -7,9 +7,9 @@ var redis = config.redis;

describe("The 'hmget' method", function () {

helper.allTests(function (parser, ip, args) {
helper.allTests(function (ip, args) {

describe('using ' + parser + ' and ' + ip, function () {
describe('using ' + ip, function () {
var client;
var hash = 'test hash';

Expand Down
4 changes: 2 additions & 2 deletions test/commands/hmset.spec.js
Expand Up @@ -7,9 +7,9 @@ var redis = config.redis;

describe("The 'hmset' method", function () {

helper.allTests(function (parser, ip, args) {
helper.allTests(function (ip, args) {

describe('using ' + parser + ' and ' + ip, function () {
describe('using ' + ip, function () {
var client;
var hash = 'test hash';

Expand Down
4 changes: 2 additions & 2 deletions test/commands/hset.spec.js
Expand Up @@ -7,9 +7,9 @@ var redis = config.redis;

describe("The 'hset' method", function () {

helper.allTests(function (parser, ip, args) {
helper.allTests(function (ip, args) {

describe('using ' + parser + ' and ' + ip, function () {
describe('using ' + ip, function () {
var client;
var hash = 'test hash';

Expand Down
4 changes: 2 additions & 2 deletions test/commands/incr.spec.js
Expand Up @@ -7,9 +7,9 @@ var redis = config.redis;

describe("The 'incr' method", function () {

helper.allTests(function (parser, ip, args) {
helper.allTests(function (ip, args) {

describe('using ' + parser + ' and ' + ip, function () {
describe('using ' + ip, function () {

describe('when connected and a value in Redis', function () {

Expand Down
4 changes: 2 additions & 2 deletions test/commands/info.spec.js
Expand Up @@ -7,9 +7,9 @@ var redis = config.redis;

describe("The 'info' method", function () {

helper.allTests(function (parser, ip, args) {
helper.allTests(function (ip, args) {

describe('using ' + parser + ' and ' + ip, function () {
describe('using ' + ip, function () {
var client;

beforeEach(function (done) {
Expand Down
4 changes: 2 additions & 2 deletions test/commands/keys.spec.js
Expand Up @@ -8,9 +8,9 @@ var redis = config.redis;

describe("The 'keys' method", function () {

helper.allTests(function (parser, ip, args) {
helper.allTests(function (ip, args) {

describe('using ' + parser + ' and ' + ip, function () {
describe('using ' + ip, function () {
var client;

beforeEach(function (done) {
Expand Down
4 changes: 2 additions & 2 deletions test/commands/mget.spec.js
Expand Up @@ -7,9 +7,9 @@ var redis = config.redis;

describe("The 'mget' method", function () {

helper.allTests(function (parser, ip, args) {
helper.allTests(function (ip, args) {

describe('using ' + parser + ' and ' + ip, function () {
describe('using ' + ip, function () {
var client;

beforeEach(function (done) {
Expand Down
4 changes: 2 additions & 2 deletions test/commands/monitor.spec.js
Expand Up @@ -8,7 +8,7 @@ var redis = config.redis;

describe("The 'monitor' method", function () {

helper.allTests(function (parser, ip, args) {
helper.allTests(function (ip, args) {

var client;

Expand Down Expand Up @@ -62,7 +62,7 @@ describe("The 'monitor' method", function () {
end(err);
});
monitorClient.subscribe('foo', 'baz', function (err, res) {
// The return value might change in v.3
// The return value might change in v.4
// assert.strictEqual(res, 'baz');
// TODO: Fix the return value of subscribe calls
end(err);
Expand Down
4 changes: 2 additions & 2 deletions test/commands/mset.spec.js
Expand Up @@ -8,9 +8,9 @@ var uuid = require('uuid');

describe("The 'mset' method", function () {

helper.allTests(function (parser, ip, args) {
helper.allTests(function (ip, args) {

describe('using ' + parser + ' and ' + ip, function () {
describe('using ' + ip, function () {
var key, value, key2, value2;

beforeEach(function () {
Expand Down
4 changes: 2 additions & 2 deletions test/commands/msetnx.spec.js
Expand Up @@ -6,9 +6,9 @@ var redis = config.redis;

describe("The 'msetnx' method", function () {

helper.allTests(function (parser, ip, args) {
helper.allTests(function (ip, args) {

describe('using ' + parser + ' and ' + ip, function () {
describe('using ' + ip, function () {
var client;

beforeEach(function (done) {
Expand Down

0 comments on commit 79927c5

Please sign in to comment.