Skip to content

Commit 69afee0

Browse files
authored
Merge pull request #3075 from RedisInsight/e2e/feature/RI-5396_SSH_for_clustered_dbs
E2e/feature/ri 5396 ssh for clustered dbs
2 parents 9834ff4 + 0069c23 commit 69afee0

File tree

4 files changed

+45
-2
lines changed

4 files changed

+45
-2
lines changed

tests/e2e/helpers/conf.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,14 @@ export const ossStandaloneForSSHConfig = {
120120
databasePassword: process.env.OSS_STANDALONE_SSH_PASSWORD
121121
};
122122

123+
export const ossClusterForSSHConfig = {
124+
host: process.env.OSS_STANDALONE_SSH_HOST || '172.33.100.211',
125+
port: process.env.OSS_STANDALONE_SSH_PORT || '6379',
126+
databaseName: `${process.env.OSS_STANDALONE_SSH_DATABASE_NAME || 'oss-cluster-for-ssh'}-${uniqueId}`,
127+
databaseUsername: process.env.OSS_STANDALONE_SSH_USERNAME,
128+
databasePassword: process.env.OSS_STANDALONE_SSH_PASSWORD
129+
};
130+
123131
export const ossStandaloneTlsConfig = {
124132
host: process.env.OSS_STANDALONE_TLS_HOST || 'oss-standalone-tls',
125133
port: process.env.OSS_STANDALONE_TLS_PORT || '6379',

tests/e2e/rte.docker-compose.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,8 @@ services:
137137
networks:
138138
default:
139139
ipv4_address: 172.31.100.211
140+
ssh:
141+
ipv4_address: 172.33.100.211
140142
master-plain-7-2:
141143
logging: *logging
142144
build: *cluster-plain-7-build

tests/e2e/tests/electron/critical-path/database/add-ssh-db.e2e.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { rte } from '../../../../helpers/constants';
22
import { BrowserPage, MyRedisDatabasePage } from '../../../../pageObjects';
3-
import { commonUrl, ossStandaloneForSSHConfig } from '../../../../helpers/conf';
3+
import { commonUrl, ossClusterForSSHConfig, ossStandaloneForSSHConfig } from '../../../../helpers/conf';
44
import { DatabaseHelper } from '../../../../helpers/database';
55
import { DatabaseAPIRequests } from '../../../../helpers/api/api-database';
66
import { sshPrivateKey, sshPrivateKeyWithPasscode } from '../../../../test-data/sshPrivateKeys';
@@ -31,6 +31,10 @@ const sshDbPasscode = {
3131
...ossStandaloneForSSHConfig,
3232
databaseName: `SSH_${Common.generateWord(5)}`
3333
};
34+
const sshDbClusterPass = {
35+
...ossClusterForSSHConfig,
36+
databaseName: `SSH_Cluster_${Common.generateWord(5)}`
37+
};
3438

3539
fixture `Adding database with SSH`
3640
.meta({ type: 'critical_path', rte: rte.standalone })
@@ -118,3 +122,13 @@ test('Adding database with SSH', async t => {
118122
await myRedisDatabasePage.clickOnDBByName(sshDbPasscode.databaseName);
119123
await Common.checkURLContainsText('browser');
120124
});
125+
test('Adding OSS Cluster database with SSH', async t => {
126+
const sshWithPass = {
127+
...sshParams,
128+
sshPassword: 'pass'
129+
};
130+
// Verify that user can add SSH tunnel with Password for OSS Cluster database
131+
await myRedisDatabasePage.AddRedisDatabase.addStandaloneSSHDatabase(sshDbClusterPass, sshWithPass);
132+
await myRedisDatabasePage.clickOnDBByName(sshDbPass.databaseName);
133+
await Common.checkURLContainsText('browser');
134+
});

tests/e2e/tests/web/critical-path/database/connecting-to-the-db.e2e.ts

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { rte } from '../../../../helpers/constants';
22
import { BrowserPage, MyRedisDatabasePage, WelcomePage } from '../../../../pageObjects';
3-
import { commonUrl, invalidOssStandaloneConfig, ossStandaloneForSSHConfig } from '../../../../helpers/conf';
3+
import { commonUrl, invalidOssStandaloneConfig, ossClusterForSSHConfig, ossStandaloneForSSHConfig } from '../../../../helpers/conf';
44
import { DatabaseHelper } from '../../../../helpers/database';
55
import { DatabaseAPIRequests } from '../../../../helpers/api/api-database';
66
import { sshPrivateKey, sshPrivateKeyWithPasscode } from '../../../../test-data/sshPrivateKeys';
@@ -32,6 +32,10 @@ const sshDbPasscode = {
3232
...ossStandaloneForSSHConfig,
3333
databaseName: `SSH_${Common.generateWord(5)}`
3434
};
35+
const sshDbClusterPass = {
36+
...ossClusterForSSHConfig,
37+
databaseName: `SSH_Cluster_${Common.generateWord(5)}`
38+
};
3539

3640
fixture `Connecting to the databases verifications`
3741
.meta({ type: 'critical_path' })
@@ -170,3 +174,18 @@ test
170174
await myRedisDatabasePage.clickOnDBByName(sshDbPasscode.databaseName);
171175
await Common.checkURLContainsText('browser');
172176
});
177+
test
178+
.meta({ rte: rte.ossCluster })
179+
.after(async() => {
180+
// Delete databases
181+
await databaseAPIRequests.deleteStandaloneDatabaseApi(sshDbClusterPass);
182+
})('Adding OSS Cluster database with SSH', async() => {
183+
const sshWithPass = {
184+
...sshParams,
185+
sshPassword: 'pass'
186+
};
187+
// Verify that user can add SSH tunnel with Password for OSS Cluster database
188+
await myRedisDatabasePage.AddRedisDatabase.addStandaloneSSHDatabase(sshDbClusterPass, sshWithPass);
189+
await myRedisDatabasePage.clickOnDBByName(sshDbPass.databaseName);
190+
await Common.checkURLContainsText('browser');
191+
});

0 commit comments

Comments
 (0)