You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-07 13:22:56 +03:00
tweaks based on running test-suite on Windows on an older Redis
This commit is contained in:
@@ -98,17 +98,26 @@ module.exports = {
|
||||
// Return true if the server version >= desired_version
|
||||
var version = connection.server_info.versions;
|
||||
for (var i = 0; i < 3; i++) {
|
||||
if (version[i] > desired_version[i]) return true;
|
||||
if (version[i] < desired_version[i]) return false;
|
||||
if (version[i] < desired_version[i]) {
|
||||
if (this.skip) this.skip();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
},
|
||||
allTests: function (cb) {
|
||||
[undefined].forEach(function (options) { // add buffer option at some point
|
||||
describe(options && options.return_buffers ? "returning buffers" : "returning strings", function () {
|
||||
['hiredis', 'javascript'].forEach(function (parser) {
|
||||
cb(parser, "/tmp/redis.sock", config.configureClient(parser, "/tmp/redis.sock", options));
|
||||
['IPv4', 'IPv6'].forEach(function (ip) {
|
||||
var parsers = ['javascript'];
|
||||
var protocols = ['IPv4'];
|
||||
if (process.platform !== 'win32') {
|
||||
parsers.push('hiredis');
|
||||
protocols.push('IPv6')
|
||||
}
|
||||
|
||||
parsers.forEach(function (parser) {
|
||||
if (process.platform !== 'win32') cb(parser, "/tmp/redis.sock", config.configureClient(parser, "/tmp/redis.sock", options));
|
||||
protocols.forEach(function (ip) {
|
||||
cb(parser, ip, config.configureClient(parser, ip, options));
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user