try to connect

This commit is contained in:
Jan Prochazka 2021-05-27 12:38:27 +02:00
parent 9dbe73d9c3
commit f45969f5d3
3 changed files with 74 additions and 74 deletions

View File

@ -31,29 +31,29 @@ jobs:
env: env:
POSTGRES_PASSWORD: Pwd2020Db POSTGRES_PASSWORD: Pwd2020Db
ports: ports:
- 15000:5432 - 5432:5432
mysql: # mysql:
image: mysql # image: mysql
# options: >- # # options: >-
# --default-authentication-plugin=mysql_native_password # # --default-authentication-plugin=mysql_native_password
ports: # ports:
- 15001:3306 # - 15001:3306
env: # env:
MYSQL_ROOT_PASSWORD: Pwd2020Db # MYSQL_ROOT_PASSWORD: Pwd2020Db
mssql: # mssql:
image: mcr.microsoft.com/mssql/server # image: mcr.microsoft.com/mssql/server
ports: # ports:
- 15002:1433 # - 15002:1433
env: # env:
ACCEPT_EULA: Y # ACCEPT_EULA: Y
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
# options: >- # # options: >-
# start-single-node --insecure # # start-single-node --insecure

View File

@ -7,17 +7,17 @@ const views = {
}; };
const engines = [ const engines = [
{ // {
label: 'MySQL', // label: 'MySQL',
connection: { // connection: {
engine: 'mysql@dbgate-plugin-mysql', // engine: 'mysql@dbgate-plugin-mysql',
server: 'localhost', // server: 'localhost',
password: 'Pwd2020Db', // password: 'Pwd2020Db',
user: 'root', // user: 'root',
port: 15001, // port: 15001,
}, // },
objects: [views], // objects: [views],
}, // },
{ {
label: 'PostgreSQL', label: 'PostgreSQL',
connection: { connection: {
@ -25,7 +25,7 @@ const engines = [
server: 'localhost', server: 'localhost',
password: 'Pwd2020Db', password: 'Pwd2020Db',
user: 'postgres', user: 'postgres',
port: 15000, port: 5432,
}, },
objects: [ objects: [
views, views,
@ -38,44 +38,44 @@ const engines = [
}, },
], ],
}, },
{ // {
label: 'SQL Server', // label: 'SQL Server',
connection: { // connection: {
engine: 'mssql@dbgate-plugin-mssql', // engine: 'mssql@dbgate-plugin-mssql',
server: 'localhost', // server: 'localhost',
password: 'Pwd2020Db', // password: 'Pwd2020Db',
user: 'sa', // user: 'sa',
port: 15002, // port: 15002,
}, // },
objects: [ // objects: [
views, // views,
{ // {
type: 'procedures', // type: 'procedures',
create1: 'CREATE PROCEDURE obj1 AS SELECT id FROM t1', // create1: 'CREATE PROCEDURE obj1 AS SELECT id FROM t1',
create2: 'CREATE PROCEDURE obj2 AS SELECT id FROM t2', // create2: 'CREATE PROCEDURE obj2 AS SELECT id FROM t2',
drop1: 'DROP PROCEDURE obj1', // drop1: 'DROP PROCEDURE obj1',
drop2: 'DROP PROCEDURE obj2', // drop2: 'DROP PROCEDURE obj2',
}, // },
], // ],
}, // },
{ // {
label: 'SQLite', // label: 'SQLite',
generateDbFile: true, // generateDbFile: true,
connection: { // connection: {
engine: 'sqlite@dbgate-plugin-sqlite', // engine: 'sqlite@dbgate-plugin-sqlite',
}, // },
objects: [views], // objects: [views],
}, // },
{ // {
label: 'CockroachDB', // label: 'CockroachDB',
connection: { // connection: {
engine: 'cockroach@dbgate-plugin-postgres', // engine: 'cockroach@dbgate-plugin-postgres',
server: 'localhost', // server: 'localhost',
user: 'root', // user: 'root',
port: 15003, // port: 15003,
}, // },
objects: [views], // objects: [views],
}, // },
]; ];
module.exports = engines; module.exports = engines;

View File

@ -10,7 +10,7 @@
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"wait": "cross-env DEVMODE=1 node wait.js", "wait": "cross-env DEVMODE=1 node wait.js",
"test": "cross-env DEVMODE=1 jest --runInBand", "test": "cross-env DEVMODE=1 jest",
"run:local": "docker-compose down && docker-compose up -d && yarn wait && yarn test" "run:local": "docker-compose down && docker-compose up -d && yarn wait && yarn test"
}, },
"devDependencies": { "devDependencies": {