Skip to content

Commit 23b540d

Browse files
Merge pull request #3845 from RedisInsight/fe/feature/RI-6129
#RI-6129 - do not mark database > 7.9 as redistack
2 parents bac97a3 + 1d39d51 commit 23b540d

File tree

6 files changed

+50
-2
lines changed

6 files changed

+50
-2
lines changed

redisinsight/ui/src/utils/redistack.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { Instance, RedisDefaultModules } from 'uiSrc/slices/interfaces'
33
import { isVersionHigherOrEquals, Nullable } from 'uiSrc/utils'
44

55
const REDISTACK_VERSION = '6.2.5'
6+
const NON_REDISTACK_VERSION = '7.9'
67

78
const REDISTACK_REQUIRE_MODULES: Array<string | Array<string>> = [
89
RedisDefaultModules.ReJSON,
@@ -61,6 +62,10 @@ const isRediStack = (modules: any[], version?: Nullable<string>): boolean => {
6162
return checkRediStackModules(modules)
6263
}
6364

65+
if (isVersionHigherOrEquals(version, NON_REDISTACK_VERSION)) {
66+
return false
67+
}
68+
6469
if (isVersionHigherOrEquals(version, REDISTACK_VERSION)) {
6570
return checkRediStackModules(modules)
6671
}

redisinsight/ui/src/utils/tests/redistack.spec.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ const isRediStackTests = [
4343
{ input: [unmapWithName(['bf', 'timeseries', 'ReJSON', 'searchlight', 'graph', 'redisgears', 'custom']), null], expected: false },
4444

4545
{ input: [unmapWithName(['bf', 'timeseries', 'ReJSON', 'searchlight']), '6.2.4'], expected: false },
46+
{ input: [unmapWithName(['bf', 'timeseries', 'ReJSON', 'searchlight', 'redisgears']), '7.9'], expected: false },
47+
{ input: [unmapWithName(['bf', 'timeseries', 'ReJSON', 'searchlight', 'redisgears']), '8.0.0'], expected: false },
48+
{ input: [unmapWithName(['bf', 'timeseries', 'ReJSON', 'searchlight', 'redisgears']), '8.0.0-rc'], expected: false },
4649
]
4750

4851
describe('isRediStack', () => {

tests/e2e/.desktop.env

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ OSS_STANDALONE_V5_PORT=8101
1212
OSS_STANDALONE_V7_HOST=localhost
1313
OSS_STANDALONE_V7_PORT=8108
1414

15+
OSS_STANDALONE_V8_HOST=localhost
16+
OSS_STANDALONE_V8_PORT=8109
17+
1518
OSS_STANDALONE_REDISEARCH_HOST=localhost
1619
OSS_STANDALONE_REDISEARCH_PORT=8102
1720

tests/e2e/helpers/conf.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,14 @@ export const ossStandaloneV7Config = {
4747
databasePassword: process.env.OSS_STANDALONE_V7_PASSWORD
4848
};
4949

50+
export const ossStandaloneV8Config = {
51+
host: process.env.OSS_STANDALONE_V8_HOST || 'oss-standalone-v8',
52+
port: process.env.OSS_STANDALONE_V8_PORT || '6379',
53+
databaseName: `${process.env.OSS_STANDALONE_V8_DATABASE_NAME || 'test_standalone-v8'}-${uniqueId}`,
54+
databaseUsername: process.env.OSS_STANDALONE_V8_USERNAME,
55+
databasePassword: process.env.OSS_STANDALONE_V8_PASSWORD
56+
};
57+
5058
export const ossStandaloneRedisearch = {
5159
host: process.env.OSS_STANDALONE_REDISEARCH_HOST || 'oss-standalone-redisearch',
5260
port: process.env.OSS_STANDALONE_REDISEARCH_PORT || '6379',

tests/e2e/rte.docker-compose.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,18 @@ services:
9292
ssh:
9393
ipv4_address: 172.33.100.112
9494

95+
# oss standalone v8
96+
oss-standalone-v8:
97+
logging: *logging
98+
image: redis:8.0-M01
99+
ports:
100+
- 8109:6379
101+
networks:
102+
default:
103+
ipv4_address: 172.31.100.113
104+
ssh:
105+
ipv4_address: 172.33.100.113
106+
95107
# oss standalone redisearch
96108
oss-standalone-redisearch:
97109
logging: *logging

tests/e2e/tests/web/regression/database/redisstack.e2e.ts

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
import { rte } from '../../../../helpers/constants';
22
import { DatabaseHelper } from '../../../../helpers/database';
33
import { BrowserPage, MyRedisDatabasePage } from '../../../../pageObjects';
4-
import { commonUrl, ossStandaloneConfig } from '../../../../helpers/conf';
4+
import {
5+
commonUrl,
6+
ossStandaloneConfig,
7+
ossStandaloneV8Config
8+
} from '../../../../helpers/conf';
59
import { DatabaseAPIRequests } from '../../../../helpers/api/api-database';
610

711
const myRedisDatabasePage = new MyRedisDatabasePage();
@@ -23,7 +27,7 @@ fixture `Redis Stack`
2327
})
2428
.afterEach(async() => {
2529
// Delete database
26-
await databaseAPIRequests.deleteStandaloneDatabaseApi(ossStandaloneConfig);
30+
await databaseAPIRequests.deleteAllDatabasesApi();
2731
});
2832
test('Verify that user can see module list Redis Stack icon hovering (without Redis Stack text)', async t => {
2933
// Verify that user can see Redis Stack icon when Redis Stack DB is added in the application
@@ -47,3 +51,16 @@ test('Verify that user can see Redis Stack icon in Edit mode near the DB name',
4751
const databaseName = myRedisDatabasePage.redisStackIcon.parent().nextSibling();
4852
await t.expect(databaseName.withAttribute('data-testid', 'edit-alias-btn').exists).ok('Edit button not found');
4953
});
54+
test.before(async() => {
55+
// Add new databases using API
56+
await databaseHelper.acceptLicenseTerms();
57+
await databaseAPIRequests.addNewStandaloneDatabaseApi(ossStandaloneV8Config);
58+
// Reload Page
59+
await browserPage.reloadPage();
60+
})('Verify that Redis Stack is not displayed for stack >8', async t => {
61+
// Verify that user can not see Redis Stack icon when Redis Stack DB > 8 is added in the application
62+
await t.expect(myRedisDatabasePage.redisStackIcon.visible).notOk('Redis Stack icon found');
63+
await t.click(myRedisDatabasePage.editDatabaseButton);
64+
// Check redis stack icon near the db name
65+
await t.expect(myRedisDatabasePage.redisStackIcon.visible).notOk('Redis Stack icon found');
66+
});

0 commit comments

Comments
 (0)