|
1 |
| -import { checkRediStack, REDISTACK_MODULES, REDISTACK_PORT } from 'uiSrc/utils' |
| 1 | +/* eslint-disable max-len */ |
| 2 | +import { checkRediStack, REDISTACK_PORT } from 'uiSrc/utils' |
| 3 | +import { RedisDefaultModules } from 'uiSrc/slices/interfaces' |
2 | 4 |
|
3 | 5 | const unmapWithName = (arr: any[]) => arr.map((item) => ({ name: item }))
|
4 | 6 |
|
5 |
| -const REDISTACK_MODULE_DEFAULT = unmapWithName(REDISTACK_MODULES) |
| 7 | +const REDISTACK_MODULE_DEFAULT = unmapWithName([ |
| 8 | + RedisDefaultModules.ReJSON, |
| 9 | + RedisDefaultModules.Graph, |
| 10 | + RedisDefaultModules.TimeSeries, |
| 11 | + RedisDefaultModules.Search, |
| 12 | + RedisDefaultModules.Bloom, |
| 13 | +].sort()) |
6 | 14 |
|
7 | 15 | const getOutputCheckRediStackTests: any[] = [
|
8 |
| - [[{ port: REDISTACK_PORT, modules: REDISTACK_MODULE_DEFAULT }, |
9 |
| - { port: 12000, modules: REDISTACK_MODULE_DEFAULT }], |
10 |
| - [{ port: REDISTACK_PORT, modules: REDISTACK_MODULE_DEFAULT, isRediStack: true }, |
11 |
| - { port: 12000, modules: REDISTACK_MODULE_DEFAULT, isRediStack: false }]], |
12 |
| - [[{ port: REDISTACK_PORT, modules: REDISTACK_MODULE_DEFAULT }], |
13 |
| - [{ port: REDISTACK_PORT, modules: REDISTACK_MODULE_DEFAULT, isRediStack: true }]], |
14 |
| - [[{ port: REDISTACK_PORT, modules: unmapWithName(['']) }], [{ port: REDISTACK_PORT, modules: unmapWithName(['']), isRediStack: false }]], |
15 |
| - [[{ port: REDISTACK_PORT, modules: unmapWithName(['search']) }], [{ port: REDISTACK_PORT, modules: unmapWithName(['search']), isRediStack: false }]], |
16 |
| - [[{ port: REDISTACK_PORT, modules: unmapWithName(['bf', 'search', 'timeseries']) }], [{ port: REDISTACK_PORT, modules: unmapWithName(['bf', 'search', 'timeseries']), isRediStack: false }]], |
17 |
| - [[{ port: 12000, modules: REDISTACK_MODULE_DEFAULT }], |
18 |
| - [{ port: 12000, modules: REDISTACK_MODULE_DEFAULT, isRediStack: true }]], |
19 |
| - [[{ port: 12000, modules: unmapWithName(['search']) }], [{ port: 12000, modules: unmapWithName(['search']), isRediStack: false }]], |
| 16 | + [ |
| 17 | + [{ port: REDISTACK_PORT, modules: REDISTACK_MODULE_DEFAULT }, { port: 12000, modules: REDISTACK_MODULE_DEFAULT }], |
| 18 | + [{ port: REDISTACK_PORT, modules: REDISTACK_MODULE_DEFAULT, isRediStack: true }, { port: 12000, modules: REDISTACK_MODULE_DEFAULT, isRediStack: false }] |
| 19 | + ], |
| 20 | + [ |
| 21 | + [{ port: REDISTACK_PORT, modules: REDISTACK_MODULE_DEFAULT }], |
| 22 | + [{ port: REDISTACK_PORT, modules: REDISTACK_MODULE_DEFAULT, isRediStack: true }] |
| 23 | + ], |
| 24 | + [ |
| 25 | + [{ port: REDISTACK_PORT, modules: unmapWithName(['']) }], |
| 26 | + [{ port: REDISTACK_PORT, modules: unmapWithName(['']), isRediStack: false }] |
| 27 | + ], |
| 28 | + [ |
| 29 | + [{ port: REDISTACK_PORT, modules: unmapWithName(['search']) }], |
| 30 | + [{ port: REDISTACK_PORT, modules: unmapWithName(['search']), isRediStack: false }] |
| 31 | + ], |
| 32 | + [ |
| 33 | + [{ port: REDISTACK_PORT, modules: unmapWithName(['bf', 'search', 'timeseries']) }], |
| 34 | + [{ port: REDISTACK_PORT, modules: unmapWithName(['bf', 'search', 'timeseries']), isRediStack: false }] |
| 35 | + ], |
| 36 | + [ |
| 37 | + [{ port: 12000, modules: REDISTACK_MODULE_DEFAULT }], |
| 38 | + [{ port: 12000, modules: REDISTACK_MODULE_DEFAULT, isRediStack: true }] |
| 39 | + ], |
| 40 | + [ |
| 41 | + [{ port: 12000, modules: unmapWithName(['search']) }], |
| 42 | + [{ port: 12000, modules: unmapWithName(['search']), isRediStack: false }] |
| 43 | + ], |
| 44 | + // check searchlight - should be also marked as RediStack |
| 45 | + [ |
| 46 | + [{ port: 12000, modules: unmapWithName(['bf', 'timeseries', 'ReJSON', 'searchlight', 'graph']) }], |
| 47 | + [{ port: 12000, modules: unmapWithName(['bf', 'timeseries', 'ReJSON', 'searchlight', 'graph']), isRediStack: true }] |
| 48 | + ], |
| 49 | + [ |
| 50 | + [{ port: 12000, modules: [] }], |
| 51 | + [{ port: 12000, modules: [], isRediStack: false }] |
| 52 | + ], |
| 53 | + [ |
| 54 | + [{ port: 12000, modules: unmapWithName(['ReJSON']) }], |
| 55 | + [{ port: 12000, modules: unmapWithName(['ReJSON']), isRediStack: false }] |
| 56 | + ], |
| 57 | + [ |
| 58 | + [{ port: 12000, modules: unmapWithName(['bf', 'timeseries', 'ReJSON', 'searchlight', 'graph', 'custom']) }], |
| 59 | + [{ port: 12000, modules: unmapWithName(['bf', 'timeseries', 'ReJSON', 'searchlight', 'graph', 'custom']), isRediStack: false }] |
| 60 | + ], |
20 | 61 | ]
|
21 | 62 |
|
22 | 63 | describe('checkRediStack', () => {
|
|
0 commit comments