You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-09 00:22:08 +03:00
fix tests with redis 6.0.x
This commit is contained in:
@@ -108,13 +108,18 @@ describe('Client', () => {
|
|||||||
password: 'wrongpassword'
|
password: 'wrongpassword'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
let message;
|
||||||
|
if (isRedisVersionGreaterThan([6, 2])) {
|
||||||
|
message = 'WRONGPASS invalid username-password pair or user is disabled.';
|
||||||
|
} else if (isRedisVersionGreaterThan([6])) {
|
||||||
|
message = 'WRONGPASS invalid username-password pair';
|
||||||
|
} else {
|
||||||
|
message = 'ERR invalid password';
|
||||||
|
}
|
||||||
|
|
||||||
await assert.rejects(
|
await assert.rejects(
|
||||||
client.connect(),
|
client.connect(),
|
||||||
{
|
{ message }
|
||||||
message: isRedisVersionGreaterThan([6]) ?
|
|
||||||
'WRONGPASS invalid username-password pair or user is disabled.' :
|
|
||||||
'ERR invalid password'
|
|
||||||
}
|
|
||||||
);
|
);
|
||||||
|
|
||||||
assert.equal(client.isOpen, false);
|
assert.equal(client.isOpen, false);
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
import { strict as assert } from 'assert';
|
import { strict as assert } from 'assert';
|
||||||
import { describeHandleMinimumRedisVersion, itWithClient, TestRedisServers } from '../test-utils';
|
import { describeHandleMinimumRedisVersion, isRedisVersionGreaterThan, itWithClient, TestRedisServers } from '../test-utils';
|
||||||
import { transformArguments } from './ACL_GETUSER';
|
import { transformArguments } from './ACL_GETUSER';
|
||||||
|
|
||||||
describe('ACL GETUSER', () => {
|
describe('ACL GETUSER', () => {
|
||||||
@@ -20,7 +20,7 @@ describe('ACL GETUSER', () => {
|
|||||||
passwords: [],
|
passwords: [],
|
||||||
commands: '+@all',
|
commands: '+@all',
|
||||||
keys: ['*'],
|
keys: ['*'],
|
||||||
channels: ['*']
|
channels: isRedisVersionGreaterThan([6, 2]) ? ['*'] : undefined
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@@ -73,5 +73,7 @@ describe('HELLO', () => {
|
|||||||
modules: []
|
modules: []
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
}, {
|
||||||
|
minimumRedisVersion: [6, 2]
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user