Skip to content

Commit 4096a79

Browse files
author
Artem
committed
#RI-3974 Fix existing ITests
1 parent b1a108b commit 4096a79

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

redisinsight/api/test/api/database/POST-databases.test.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,15 @@ const dataSchema = Joi.object({
3030
username: Joi.string(),
3131
password: Joi.string(),
3232
}).allow(null),
33+
ssh: Joi.boolean().allow(null),
34+
sshOptions: Joi.object({
35+
host: Joi.string().required(),
36+
port: Joi.number().required(),
37+
username: Joi.string().required(),
38+
password: Joi.string().allow(null),
39+
privateKey: Joi.string().allow(null),
40+
passphrase: Joi.string().allow(null),
41+
}).allow(null),
3342
}).messages({
3443
'any.required': '{#label} should not be empty',
3544
}).strict(true);

redisinsight/api/test/api/database/PUT-databases-id.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ describe(`PUT /databases/:id`, () => {
163163
after: async () => {
164164
newDatabase = await localDb.getInstanceById(constants.TEST_INSTANCE_ID_3);
165165
expect(newDatabase).to.contain({
166-
..._.omit(oldDatabase, ['modules', 'provider', 'lastConnection', 'new']),
166+
..._.omit(oldDatabase, ['modules', 'provider', 'lastConnection', 'new', 'ssh']),
167167
host: constants.TEST_REDIS_HOST,
168168
port: constants.TEST_REDIS_PORT,
169169
});

redisinsight/api/test/api/database/constants.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,13 @@ export const databaseSchema = Joi.object().keys({
3333
version: Joi.number().integer(),
3434
semanticVersion: Joi.string(),
3535
}).allow(null),
36+
ssh: Joi.boolean().allow(null),
37+
sshOptions: Joi.object({
38+
host: Joi.string().required(),
39+
port: Joi.number().required(),
40+
username: Joi.string().required(),
41+
password: Joi.string().allow(null),
42+
privateKey: Joi.string().allow(null),
43+
passphrase: Joi.string().allow(null),
44+
}).allow(null),
3645
});

0 commit comments

Comments
 (0)