You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-09 00:22:08 +03:00
CAE-193: add "IGNORE" options to time series commands (for v5 branch) (#2753)
* CAE-193: add "IGNORE" options to time series commands (for v5 branch) * add INCR/DECR and modify tests to not test ignore on older version * require maxTimeDiff/maxValDiff to be specified also rename them * fix add/ignore test after api change * update tests for api change in IGNORE option
This commit is contained in:
@@ -57,16 +57,29 @@ describe('TS.ADD', () => {
|
||||
);
|
||||
});
|
||||
|
||||
it('with RETENTION, ENCODING, CHUNK_SIZE, ON_DUPLICATE, LABELS', () => {
|
||||
it ('with IGNORE', () => {
|
||||
assert.deepEqual(
|
||||
ADD.transformArguments('key', '*', 1, {
|
||||
IGNORE: {
|
||||
maxTimeDiff: 1,
|
||||
maxValDiff: 1
|
||||
}
|
||||
}),
|
||||
['TS.ADD', 'key', '*', '1', 'IGNORE', '1', '1']
|
||||
)
|
||||
});
|
||||
|
||||
it('with RETENTION, ENCODING, CHUNK_SIZE, ON_DUPLICATE, LABELS, IGNORE', () => {
|
||||
assert.deepEqual(
|
||||
ADD.transformArguments('key', '*', 1, {
|
||||
RETENTION: 1,
|
||||
ENCODING: TIME_SERIES_ENCODING.UNCOMPRESSED,
|
||||
CHUNK_SIZE: 1,
|
||||
ON_DUPLICATE: TIME_SERIES_DUPLICATE_POLICIES.BLOCK,
|
||||
LABELS: { label: 'value' }
|
||||
LABELS: { label: 'value' },
|
||||
IGNORE: { maxTimeDiff: 1, maxValDiff: 1}
|
||||
}),
|
||||
['TS.ADD', 'key', '*', '1', 'RETENTION', '1', 'ENCODING', 'UNCOMPRESSED', 'CHUNK_SIZE', '1', 'ON_DUPLICATE', 'BLOCK', 'LABELS', 'label', 'value']
|
||||
['TS.ADD', 'key', '*', '1', 'RETENTION', '1', 'ENCODING', 'UNCOMPRESSED', 'CHUNK_SIZE', '1', 'ON_DUPLICATE', 'BLOCK', 'LABELS', 'label', 'value', 'IGNORE', '1', '1']
|
||||
);
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user