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:
@@ -56,6 +56,18 @@ describe('TS.DECRBY', () => {
|
||||
);
|
||||
});
|
||||
|
||||
it ('with IGNORE', () => {
|
||||
assert.deepEqual(
|
||||
DECRBY.transformArguments('key', 1, {
|
||||
IGNORE: {
|
||||
maxTimeDiff: 1,
|
||||
maxValDiff: 1
|
||||
}
|
||||
}),
|
||||
['TS.DECRBY', 'key', '1', 'IGNORE', '1', '1']
|
||||
)
|
||||
});
|
||||
|
||||
it('with TIMESTAMP, RETENTION, UNCOMPRESSED, CHUNK_SIZE and LABELS', () => {
|
||||
assert.deepEqual(
|
||||
DECRBY.transformArguments('key', 1, {
|
||||
@@ -63,9 +75,10 @@ describe('TS.DECRBY', () => {
|
||||
RETENTION: 1,
|
||||
UNCOMPRESSED: true,
|
||||
CHUNK_SIZE: 2,
|
||||
LABELS: { label: 'value' }
|
||||
LABELS: { label: 'value' },
|
||||
IGNORE: { maxTimeDiff: 1, maxValDiff: 1 }
|
||||
}),
|
||||
['TS.DECRBY', 'key', '1', 'TIMESTAMP', '*', 'RETENTION', '1', 'UNCOMPRESSED', 'CHUNK_SIZE', '2', 'LABELS', 'label', 'value']
|
||||
['TS.DECRBY', 'key', '1', 'TIMESTAMP', '*', 'RETENTION', '1', 'UNCOMPRESSED', 'CHUNK_SIZE', '2', 'LABELS', 'label', 'value', 'IGNORE', '1', '1']
|
||||
);
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user