diff --git a/changelog.md b/changelog.md index 42f9ef7ee9..9ae0be8dfb 100644 --- a/changelog.md +++ b/changelog.md @@ -15,6 +15,7 @@ Features - The `drain` event is from now on only emitted if the stream really had to buffer - Reduced the default connect_timeout to be one hour instead of 24h ([@BridgeAR](https://github.com/BridgeAR)) - Added .path to redis.createClient(options); ([@BridgeAR](https://github.com/BridgeAR)) +- Ignore info command, if not available on server ([@ivanB1975](https://github.com/ivanB1975)) Bugfixes diff --git a/test/connection.spec.js b/test/connection.spec.js index c3b17fae43..f5bcacdeff 100644 --- a/test/connection.spec.js +++ b/test/connection.spec.js @@ -266,6 +266,18 @@ describe("connection tests", function () { }); }); + it("connects correctly even if the info command is not present on the redis server", function (done) { + client = redis.createClient.apply(redis.createClient, args); + client.info = function (cb) { + // Mock the result + cb(new Error("ERR unknown command 'info'")); + }; + client.once("ready", function () { + assert.strictEqual(Object.keys(client.server_info).length, 0); + done(); + }); + }); + it("works with missing options object for new redis instances", function () { // This is needed for libraries that have their own createClient function like fakeredis client = new redis.RedisClient({ on: function () {}});