diff --git a/integration-tests/__tests__/analyse.spec.js b/integration-tests/__tests__/analyse.spec.js index 599b04a8..3e6b436a 100644 --- a/integration-tests/__tests__/analyse.spec.js +++ b/integration-tests/__tests__/analyse.spec.js @@ -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); diff --git a/integration-tests/docker-compose.yaml b/integration-tests/docker-compose.yaml index d52082fd..556b46e8 100644 --- a/integration-tests/docker-compose.yaml +++ b/integration-tests/docker-compose.yaml @@ -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 diff --git a/integration-tests/engines.js b/integration-tests/engines.js index 8565670a..7c216802 100644 --- a/integration-tests/engines.js +++ b/integration-tests/engines.js @@ -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;