import { PostgreSQLStore } from '../src/PostgreSQL/store'; import assert from 'assert'; import { TestContext } from './Context'; import { v4 } from 'uuid'; import { EntityDict, storageSchema } from './test-app-domain'; import { generateNewIdAsync } from 'oak-domain/lib/utils/uuid'; import { describe, it, before, after } from 'mocha'; import { tests } from './testcase'; describe('test postgresstore', async function () { this.timeout(60000); let store: PostgreSQLStore; before(async () => { store = new PostgreSQLStore(storageSchema, { host: 'localhost', database: 'oakdb', user: 'postgres', password: 'postgres', max: 20, port: 5432, }); store.connect(); await store.initialize({ ifExists: 'drop', }); }); tests(() => store!) after(() => { store.disconnect(); }); });