Skip to content

Commit 31cf805

Browse files
authored
Merge pull request #2007 from RedisInsight/be/bugfix/RI-4445-db_import_missed_provider_field
#RI-4445 handle provider field during db import
2 parents 33b109c + 4d3667f commit 31cf805

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,12 @@ describe('DatabaseImportService', () => {
161161
it('should create standalone database', async () => {
162162
await service['createDatabase']({
163163
...mockDatabase,
164+
provider: 'RE_CLOUD',
164165
}, 0);
165166

166167
expect(databaseRepository.create).toHaveBeenCalledWith({
167168
...pick(mockDatabase, ['host', 'port', 'name', 'connectionType', 'timeout']),
169+
provider: 'RE_CLOUD',
168170
new: true,
169171
});
170172
});

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ export class DatabaseImportService {
3737
['host', ['host']],
3838
['port', ['port']],
3939
['db', ['db']],
40+
['provider', ['provider']],
4041
['isCluster', ['cluster']],
4142
['type', ['type']],
4243
['connectionType', ['connectionType']],

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',
17+
'new', 'ssh', 'sshOptions', 'provider',
1818
] as const) {
1919
@Expose()
2020
@IsNotEmpty()

0 commit comments

Comments
 (0)