mirror of
https://github.com/graphql-hive/console
synced 2026-05-22 08:38:27 +00:00
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Kamil Kisiela <kamil.kisiela@gmail.com>
20 lines
639 B
TypeScript
20 lines
639 B
TypeScript
import { createPool } from 'slonik';
|
|
import * as utils from '@n1ru4l/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(async () => resetDb(await pool));
|
|
beforeEach(() => resetClickHouse());
|
|
beforeEach(() =>
|
|
resetRedis({
|
|
host: redisAddress.replace(':6379', ''),
|
|
port: 6379,
|
|
password: 'test',
|
|
}),
|
|
);
|