dbgate/integration-tests/engines.js

100 lines
2.1 KiB
JavaScript
Raw Normal View History

2021-05-27 08:53:53 +00:00
const views = {
type: 'views',
create1: 'CREATE VIEW obj1 AS SELECT id FROM t1',
create2: 'CREATE VIEW obj2 AS SELECT id FROM t2',
drop1: 'DROP VIEW obj1',
drop2: 'DROP VIEW obj2',
};
2021-05-27 07:12:21 +00:00
const engines = [
2021-05-27 11:07:58 +00:00
{
label: 'MySQL',
connection: {
engine: 'mysql@dbgate-plugin-mysql',
password: 'Pwd2020Db',
user: 'root',
server: 'mysql',
port: 3306,
},
local: {
server: 'localhost',
port: 15001,
},
2021-05-27 13:51:54 +00:00
// skipOnCI: true,
2021-05-27 11:07:58 +00:00
objects: [views],
},
2021-05-27 07:26:37 +00:00
{
label: 'PostgreSQL',
connection: {
engine: 'postgres@dbgate-plugin-postgres',
password: 'Pwd2020Db',
user: 'postgres',
2021-05-27 11:07:58 +00:00
server: 'postgres',
2021-05-27 10:38:27 +00:00
port: 5432,
2021-05-27 07:26:37 +00:00
},
2021-05-27 11:07:58 +00:00
local: {
server: 'localhost',
port: 15000,
},
objects: [
views,
{
type: 'procedures',
create1: 'CREATE PROCEDURE obj1() LANGUAGE SQL AS $$ select * from t1 $$',
create2: 'CREATE PROCEDURE obj2() LANGUAGE SQL AS $$ select * from t2 $$',
drop1: 'DROP PROCEDURE obj1',
drop2: 'DROP PROCEDURE obj2',
},
],
2021-05-27 07:26:37 +00:00
},
2021-05-27 11:07:58 +00:00
{
label: 'SQL Server',
connection: {
engine: 'mssql@dbgate-plugin-mssql',
password: 'Pwd2020Db',
user: 'sa',
server: 'mssql',
port: 1433,
},
local: {
server: 'localhost',
port: 15002,
},
objects: [
views,
{
type: 'procedures',
create1: 'CREATE PROCEDURE obj1 AS SELECT id FROM t1',
create2: 'CREATE PROCEDURE obj2 AS SELECT id FROM t2',
drop1: 'DROP PROCEDURE obj1',
drop2: 'DROP PROCEDURE obj2',
},
],
},
{
label: 'SQLite',
generateDbFile: true,
connection: {
engine: 'sqlite@dbgate-plugin-sqlite',
},
objects: [views],
},
{
label: 'CockroachDB',
connection: {
engine: 'cockroach@dbgate-plugin-postgres',
user: 'root',
server: 'cockroachdb',
port: 26257,
},
local: {
server: 'localhost',
port: 15003,
},
2021-05-27 13:13:14 +00:00
skipOnCI: true,
2021-05-27 11:07:58 +00:00
objects: [views],
},
2021-05-27 07:12:21 +00:00
];
2021-05-27 13:28:24 +00:00
module.exports = process.env.CITEST ? engines.filter(x => !x.skipOnCI) : engines;