1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-04 15:02:09 +03:00

CAE-193: add "IGNORE" options to time series commands (for v4 branch) (#2752)

This commit is contained in:
Shaya Potter
2024-07-10 19:45:33 +03:00
committed by GitHub
parent a1bee1caaf
commit 5576a0db49
7 changed files with 65 additions and 11 deletions

View File

@@ -48,15 +48,25 @@ describe('ALTER', () => {
);
});
it('with RETENTION, CHUNK_SIZE, DUPLICATE_POLICY, LABELS', () => {
it('with IGNORE with MAX_TIME_DIFF', () => {
assert.deepEqual(
transformArguments('key', {
IGNORE: { MAX_TIME_DIFF: 1, MAX_VAL_DIFF: 1}
}),
['TS.ALTER', 'key', 'IGNORE', '1', '1']
)
});
it('with RETENTION, CHUNK_SIZE, DUPLICATE_POLICY, LABELS, IGNORE', () => {
assert.deepEqual(
transformArguments('key', {
RETENTION: 1,
CHUNK_SIZE: 1,
DUPLICATE_POLICY: TimeSeriesDuplicatePolicies.BLOCK,
LABELS: { label: 'value' }
LABELS: { label: 'value' },
IGNORE: { MAX_TIME_DIFF: 1, MAX_VAL_DIFF: 1}
}),
['TS.ALTER', 'key', 'RETENTION', '1', 'CHUNK_SIZE', '1', 'DUPLICATE_POLICY', 'BLOCK', 'LABELS', 'label', 'value']
['TS.ALTER', 'key', 'RETENTION', '1', 'CHUNK_SIZE', '1', 'DUPLICATE_POLICY', 'BLOCK', 'LABELS', 'label', 'value', 'IGNORE', '1', '1']
);
});
});