cockroachdb added to test

This commit is contained in:
Jan Prochazka 2021-05-27 09:58:49 +02:00
parent 28c554a75b
commit a5ad8dc5f6
3 changed files with 16 additions and 7 deletions

View File

@ -40,7 +40,7 @@ describe('Analyse tests', () => {
const conn = await connect(engine, randomDbName());
const driver = requireEngineDriver(engine.connection);
await driver.query(conn, 'CREATE TABLE t1 (id int)');
await driver.query(conn, 'CREATE TABLE t1 (id int not null primary key)');
const structure = await driver.analyseFull(conn);
@ -67,7 +67,7 @@ describe('Analyse tests', () => {
await driver.query(conn, 'CREATE TABLE t1 (id int)');
const structure1 = await driver.analyseFull(conn);
await driver.query(conn, 'CREATE TABLE t2 (id2 int)');
await driver.query(conn, 'CREATE TABLE t2 (id2 int not null primary key)');
const structure2 = await driver.analyseIncremental(conn, structure1);
expect(structure2.tables.length).toEqual(2);

View File

@ -27,11 +27,11 @@ services:
- SA_PASSWORD=Pwd2020Db
- MSSQL_PID=Express
# cockroachdb:
# image: cockroachdb/cockroach
# ports:
# - 15003:26257
# command: start-single-node --insecure
cockroachdb:
image: cockroachdb/cockroach
ports:
- 15003:26257
command: start-single-node --insecure
# mongodb:
# image: mongo:4.0.12

View File

@ -36,6 +36,15 @@ const engines = [
engine: 'sqlite@dbgate-plugin-sqlite',
},
},
{
label: 'CockroachDB',
connection: {
engine: 'cockroach@dbgate-plugin-postgres',
server: 'localhost',
user: 'root',
port: 15003,
},
},
];
module.exports = engines;