mirror of
https://github.com/graphql-hive/console
synced 2026-04-21 14:37:17 +00:00
20 lines
618 B
TypeScript
20 lines
618 B
TypeScript
import { createPool } from 'slonik';
|
|
import * as utils from 'dockest/test-helper';
|
|
import { resetDb } from './testkit/db';
|
|
import { resetClickHouse } from './testkit/clickhouse';
|
|
import { resetRedis } from './testkit/redis';
|
|
|
|
const dbAddress = utils.getServiceAddress('db', 5432);
|
|
const redisAddress = utils.getServiceAddress('redis', 6379);
|
|
|
|
const pool = createPool(`postgresql://postgres:postgres@${dbAddress}/registry`);
|
|
|
|
beforeEach(() => resetDb(pool));
|
|
beforeEach(() => resetClickHouse());
|
|
beforeEach(() =>
|
|
resetRedis({
|
|
host: redisAddress.replace(':6379', ''),
|
|
port: 6379,
|
|
password: 'test',
|
|
})
|
|
);
|