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

safe-global / safe-client-gateway / 7959999835

19 Feb 2024 01:04PM UTC coverage: 93.953% (+0.02%) from 93.936%
7959999835

Pull #1154

github

iamacook
Remove checksum from cache router
Pull Request #1154: Throw custom errors from relayer

1643 of 1954 branches covered (84.08%)

Branch coverage included in aggregate %.

46 of 46 new or added lines in 10 files covered. (100.0%)

3 existing lines in 2 files now uncovered.

6141 of 6331 relevant lines covered (97.0%)

193.77 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';
80✔
2
import { Module } from '@nestjs/common';
80✔
3
import { PostgresDatabaseShutdownHook } from '@/datasources/db/postgres-database.shutdown.hook';
80✔
4
import { IConfigurationService } from '@/config/configuration.service.interface';
80✔
5
import { PostgresDatabaseMigrationHook } from '@/datasources/db/postgres-database.migration.hook';
80✔
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 {}
80✔
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