You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
tweaks based on running test-suite on Windows on an older Redis
This commit is contained in:
@@ -24,7 +24,7 @@ describe("client authentication", function () {
|
||||
});
|
||||
|
||||
it("allows auth to be provided with 'auth' method", function (done) {
|
||||
abortOnSpawnFailure(done);
|
||||
if (helper.redisProcess().spawnFailed()) this.skip();
|
||||
|
||||
client = redis.createClient.apply(redis.createClient, args);
|
||||
client.auth(auth, function (err, res) {
|
||||
@@ -35,7 +35,7 @@ describe("client authentication", function () {
|
||||
});
|
||||
|
||||
it("raises error when auth is bad", function (done) {
|
||||
abortOnSpawnFailure(done);
|
||||
if (helper.redisProcess().spawnFailed()) this.skip();
|
||||
|
||||
client = redis.createClient.apply(redis.createClient, args);
|
||||
|
||||
@@ -49,7 +49,7 @@ describe("client authentication", function () {
|
||||
|
||||
if (ip === 'IPv4') {
|
||||
it('allows auth to be provided as part of redis url', function (done) {
|
||||
abortOnSpawnFailure(done);
|
||||
if (helper.redisProcess().spawnFailed()) this.skip();
|
||||
|
||||
client = redis.createClient('redis://foo:' + auth + '@' + config.HOST[ip] + ':' + config.PORT);
|
||||
client.on("ready", function () {
|
||||
@@ -59,7 +59,7 @@ describe("client authentication", function () {
|
||||
}
|
||||
|
||||
it('allows auth to be provided as config option for client', function (done) {
|
||||
abortOnSpawnFailure(done);
|
||||
if (helper.redisProcess().spawnFailed()) this.skip();
|
||||
|
||||
var args = config.configureClient(parser, ip, {
|
||||
auth_pass: auth
|
||||
@@ -71,7 +71,7 @@ describe("client authentication", function () {
|
||||
});
|
||||
|
||||
it('reconnects with appropriate authentication', function (done) {
|
||||
abortOnSpawnFailure(done);
|
||||
if (helper.redisProcess().spawnFailed()) this.skip();
|
||||
|
||||
var readyCount = 0;
|
||||
client = redis.createClient.apply(redis.createClient, args);
|
||||
@@ -93,13 +93,4 @@ describe("client authentication", function () {
|
||||
helper.startRedis('./conf/redis.conf', done);
|
||||
});
|
||||
});
|
||||
|
||||
// if we fail to spawn Redis (spawning Redis directly is
|
||||
// not possible in some CI environments) skip the auth tests.
|
||||
function abortOnSpawnFailure (done) {
|
||||
if (helper.redisProcess().spawnFailed()) {
|
||||
console.warn('skipped authentication test')
|
||||
return done();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user