test(repos): service 测试用例,工作目录改为从配置文件中读取。

This commit is contained in:
Ivan
2021-02-24 11:11:47 +08:00
parent 1e7c594e72
commit 625ed18ae9
2 changed files with 20 additions and 20 deletions

View File

@@ -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,
}),