1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-07 13:22:56 +03:00

tests: remove unused parser client option from all tests & helpers

This commit is contained in:
Salakar
2020-02-09 06:08:30 +00:00
parent a513c8b7e2
commit 79927c56a0
66 changed files with 149 additions and 172 deletions

View File

@@ -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;
@@ -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);
@@ -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
});
@@ -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);
@@ -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);
@@ -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);
@@ -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');
@@ -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);
@@ -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);