Skip to content

Commit 42bd8dc

Browse files
committed
#RI-5187 - tlsServername is not imported
1 parent 06e3390 commit 42bd8dc

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

redisinsight/api/src/modules/database-import/database-import.service.spec.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,21 +231,23 @@ describe('DatabaseImportService', () => {
231231
false,
232232
);
233233
});
234-
it('should create standalone with compressor', async () => {
234+
it('should create standalone with compressor and tlsServername', async () => {
235235
await service['createDatabase'](
236236
mockSessionMetadata,
237237
{
238238
...mockDatabase,
239239
compressor: Compressor.GZIP,
240+
tlsServername: 'redis-insight',
240241
},
241242
0,
242243
);
243244

244245
expect(databaseRepository.create).toHaveBeenCalledWith(
245246
mockSessionMetadata,
246247
{
247-
...pick(mockDatabase, ['host', 'port', 'name', 'connectionType', 'compressor', 'modules']),
248+
...pick(mockDatabase, ['host', 'port', 'name', 'connectionType', 'compressor', 'modules', 'tlsServername']),
248249
compressor: Compressor.GZIP,
250+
tlsServername: 'redis-insight',
249251
new: true,
250252
},
251253
false,

redisinsight/api/src/modules/database-import/dto/import.database.dto.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { UseClientCertificateDto } from 'src/modules/certificate/dto/use.client-
1414
export class ImportDatabaseDto extends PickType(Database, [
1515
'host', 'port', 'name', 'db', 'username', 'password',
1616
'connectionType', 'tls', 'verifyServerCert', 'sentinelMaster', 'nodes',
17-
'new', 'ssh', 'sshOptions', 'provider', 'compressor', 'modules',
17+
'new', 'ssh', 'sshOptions', 'provider', 'compressor', 'modules', 'tlsServername',
1818
] as const) {
1919
@Expose()
2020
@IsNotEmpty()

0 commit comments

Comments
 (0)