• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

safe-global / safe-client-gateway / 8080543737

28 Feb 2024 12:42PM CUT coverage: 93.642% (-0.06%) from 93.699%
8080543737

Pull #1215

github

hectorgomezv
Add min to random values of CacheHooksController tests
Pull Request #1215: Align FakeCacheService and RedisCacheService implementations

1676 of 2005 branches covered (83.59%)

Branch coverage included in aggregate %.

2 of 2 new or added lines in 1 file covered. (100.0%)

2 existing lines in 1 file now uncovered.

6145 of 6347 relevant lines covered (96.82%)

347.64 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

54.55
/src/datasources/db/postgres-database.module.ts
1
import * as postgres from 'postgres';
82✔
2
import { Module } from '@nestjs/common';
82✔
3
import { PostgresDatabaseShutdownHook } from '@/datasources/db/postgres-database.shutdown.hook';
82✔
4
import { IConfigurationService } from '@/config/configuration.service.interface';
82✔
5
import { PostgresDatabaseMigrationHook } from '@/datasources/db/postgres-database.migration.hook';
82✔
6

7
function dbFactory(configurationService: IConfigurationService): postgres.Sql {
8
  const sslConfig = configurationService.getOrThrow('db.postgres.ssl.enabled')
×
9
    ? {
10
        rejectUnauthorized: configurationService.getOrThrow(
11
          'db.postgres.ssl.rejectUnauthorized',
12
        ),
13
      }
14
    : false;
15
  return postgres({
×
16
    host: configurationService.getOrThrow('db.postgres.host'),
17
    port: configurationService.getOrThrow('db.postgres.port'),
18
    db: configurationService.getOrThrow('db.postgres.database'),
19
    user: configurationService.getOrThrow('db.postgres.username'),
20
    password: configurationService.getOrThrow('db.postgres.password'),
21
    ssl: sslConfig,
22
  });
23
}
24

25
@Module({
26
  providers: [
27
    {
28
      provide: 'DB_INSTANCE',
29
      useFactory: dbFactory,
30
      inject: [IConfigurationService],
31
    },
32
    PostgresDatabaseShutdownHook,
33
    PostgresDatabaseMigrationHook,
34
  ],
35
  exports: ['DB_INSTANCE'],
36
})
37
export class PostgresDatabaseModule {}
82✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc