diff --git a/integration-tests/__tests__/schema-tests.spec.js b/integration-tests/__tests__/schema-tests.spec.js index d31fcb13b..fda045c90 100644 --- a/integration-tests/__tests__/schema-tests.spec.js +++ b/integration-tests/__tests__/schema-tests.spec.js @@ -1,7 +1,7 @@ const stableStringify = require('json-stable-stringify'); const _ = require('lodash'); const fp = require('lodash/fp'); -const { testWrapper, extractConnection } = require('../tools'); +const { testWrapper } = require('../tools'); const engines = require('../engines'); const { runCommandOnDriver } = require('dbgate-tools'); @@ -62,7 +62,7 @@ describe('Schema tests', () => { await runCommandOnDriver(handle, driver, dmp => dmp.createSchema('myschema')); const schemaConnDef = { - ...extractConnection(engine), + ...engine.connection, database: `${handle.database}::myschema`, }; diff --git a/integration-tests/engines.js b/integration-tests/engines.js index 13985867f..d2617d2f6 100644 --- a/integration-tests/engines.js +++ b/integration-tests/engines.js @@ -19,10 +19,6 @@ const mysqlEngine = { engine: 'mysql@dbgate-plugin-mysql', password: 'Pwd2020Db', user: 'root', - server: 'mysql', - port: 3306, - }, - local: { server: 'localhost', port: 15001, }, @@ -170,10 +166,6 @@ const mariaDbEngine = { engine: 'mariadb@dbgate-plugin-mysql', password: 'Pwd2020Db', user: 'root', - server: 'mysql', - port: 3306, - }, - local: { server: 'localhost', port: 15004, }, @@ -194,10 +186,6 @@ const postgreSqlEngine = { engine: 'postgres@dbgate-plugin-postgres', password: 'Pwd2020Db', user: 'postgres', - server: 'postgres', - port: 5432, - }, - local: { server: 'localhost', port: 15000, }, @@ -370,10 +358,6 @@ const sqlServerEngine = { engine: 'mssql@dbgate-plugin-mssql', password: 'Pwd2020Db', user: 'sa', - server: 'mssql', - port: 1433, - }, - local: { server: 'localhost', port: 15002, }, @@ -521,10 +505,6 @@ const cockroachDbEngine = { connection: { engine: 'cockroach@dbgate-plugin-postgres', user: 'root', - server: 'cockroachdb', - port: 26257, - }, - local: { server: 'localhost', port: 15003, }, @@ -535,11 +515,8 @@ const clickhouseEngine = { label: 'ClickHouse', connection: { engine: 'clickhouse@dbgate-plugin-clickhouse', - databaseUrl: 'http://clickhouse:8123', - password: 'Pwd2020Db', - }, - local: { databaseUrl: 'http://localhost:15005', + password: 'Pwd2020Db', }, objects: [views], skipDataModifications: true, @@ -562,13 +539,9 @@ const oracleEngine = { engine: 'oracle@dbgate-plugin-oracle', password: 'Pwd2020Db', user: 'system', - server: 'oracle', - port: 1521, - serviceName: 'xe', - }, - local: { server: 'localhost', port: 15006, + serviceName: 'xe', }, skipOnCI: false, dbSnapshotBySeconds: true, diff --git a/integration-tests/tools.js b/integration-tests/tools.js index 2a25f5dd9..5f39398c2 100644 --- a/integration-tests/tools.js +++ b/integration-tests/tools.js @@ -9,28 +9,8 @@ function randomDbName(dialect) { return res; } -function extractConnection(engine) { - const { connection } = engine; - - return { - ...connection, - ...engine.local, - }; - - // const { connection } = engine; - - // if (process.env.LOCALTEST && engine.local) { - // return { - // ...connection, - // ...engine.local, - // }; - // } - - // return connection; -} - async function connect(engine, database) { - const connection = extractConnection(engine); + const { connection } = engine; const driver = requireEngineDriver(connection); if (engine.generateDbFile) { @@ -55,7 +35,7 @@ async function connect(engine, database) { } async function prepareConnection(engine, database) { - const connection = extractConnection(engine); + const { connection } = engine; const driver = requireEngineDriver(connection); if (engine.generateDbFile) { @@ -104,7 +84,6 @@ const testWrapperPrepareOnly = module.exports = { randomDbName, connect, - extractConnection, testWrapper, testWrapperPrepareOnly, }; diff --git a/integration-tests/wait.js b/integration-tests/wait.js index a61339bb3..fccba3929 100644 --- a/integration-tests/wait.js +++ b/integration-tests/wait.js @@ -1,13 +1,12 @@ const requireEngineDriver = require('dbgate-api/src/utility/requireEngineDriver'); const engines = require('./engines'); -const { extractConnection } = require('./tools'); global.DBGATE_PACKAGES = { 'dbgate-tools': require('dbgate-tools'), 'dbgate-sqltree': require('dbgate-sqltree'), }; async function connectEngine(engine) { - const connection = extractConnection(engine); + const { connection } = engine; const driver = requireEngineDriver(connection); for (;;) { try { diff --git a/workflow-templates/run-tests.yaml b/workflow-templates/run-tests.yaml index 377842780..e5280b86b 100644 --- a/workflow-templates/run-tests.yaml +++ b/workflow-templates/run-tests.yaml @@ -17,11 +17,6 @@ jobs: with: node-version: 18.x - # - name: Install dependencies for cypress - # run: | - # apt-get update - # apt-get install -y xvfb libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libnss3 libxss1 libasound2 libxtst6 - - uses: actions/checkout@v3 with: fetch-depth: 1