mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-05-02 03:13:58 +00:00
cockroachdb added to test
This commit is contained in:
@@ -40,7 +40,7 @@ describe('Analyse tests', () => {
|
|||||||
const conn = await connect(engine, randomDbName());
|
const conn = await connect(engine, randomDbName());
|
||||||
const driver = requireEngineDriver(engine.connection);
|
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);
|
const structure = await driver.analyseFull(conn);
|
||||||
|
|
||||||
@@ -67,7 +67,7 @@ describe('Analyse tests', () => {
|
|||||||
|
|
||||||
await driver.query(conn, 'CREATE TABLE t1 (id int)');
|
await driver.query(conn, 'CREATE TABLE t1 (id int)');
|
||||||
const structure1 = await driver.analyseFull(conn);
|
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);
|
const structure2 = await driver.analyseIncremental(conn, structure1);
|
||||||
|
|
||||||
expect(structure2.tables.length).toEqual(2);
|
expect(structure2.tables.length).toEqual(2);
|
||||||
|
|||||||
@@ -27,11 +27,11 @@ services:
|
|||||||
- SA_PASSWORD=Pwd2020Db
|
- SA_PASSWORD=Pwd2020Db
|
||||||
- MSSQL_PID=Express
|
- MSSQL_PID=Express
|
||||||
|
|
||||||
# cockroachdb:
|
cockroachdb:
|
||||||
# image: cockroachdb/cockroach
|
image: cockroachdb/cockroach
|
||||||
# ports:
|
ports:
|
||||||
# - 15003:26257
|
- 15003:26257
|
||||||
# command: start-single-node --insecure
|
command: start-single-node --insecure
|
||||||
|
|
||||||
# mongodb:
|
# mongodb:
|
||||||
# image: mongo:4.0.12
|
# image: mongo:4.0.12
|
||||||
|
|||||||
@@ -36,6 +36,15 @@ const engines = [
|
|||||||
engine: 'sqlite@dbgate-plugin-sqlite',
|
engine: 'sqlite@dbgate-plugin-sqlite',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: 'CockroachDB',
|
||||||
|
connection: {
|
||||||
|
engine: 'cockroach@dbgate-plugin-postgres',
|
||||||
|
server: 'localhost',
|
||||||
|
user: 'root',
|
||||||
|
port: 15003,
|
||||||
|
},
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
module.exports = engines;
|
module.exports = engines;
|
||||||
|
|||||||
Reference in New Issue
Block a user