test(repos): service 测试用例,工作目录改为从配置文件中读取。
This commit is contained in:
@@ -16,13 +16,13 @@ import configuration from './commons/config/configuration';
|
||||
}),
|
||||
TypeOrmModule.forRootAsync({
|
||||
imports: [ConfigModule],
|
||||
useFactory: (cnfigService: ConfigService) => ({
|
||||
useFactory: (configService: ConfigService) => ({
|
||||
type: 'postgres',
|
||||
host: cnfigService.get<string>('db.postgres.host'),
|
||||
port: cnfigService.get<number>('db.postgres.port'),
|
||||
username: cnfigService.get<string>('db.postgres.username'),
|
||||
password: cnfigService.get<string>('db.postgres.password'),
|
||||
database: cnfigService.get<string>('db.postgres.database'),
|
||||
host: configService.get<string>('db.postgres.host'),
|
||||
port: configService.get<number>('db.postgres.port'),
|
||||
username: configService.get<string>('db.postgres.username'),
|
||||
password: configService.get<string>('db.postgres.password'),
|
||||
database: configService.get<string>('db.postgres.database'),
|
||||
synchronize: true,
|
||||
autoLoadEntities: true,
|
||||
}),
|
||||
|
Reference in New Issue
Block a user