Skip to content

Commit

Permalink
IConnectionOptions fix for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pc3b3r committed Aug 20, 2020
1 parent b1335ee commit 06653f9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
6 changes: 4 additions & 2 deletions test/integration/runTestsFromPath.test.ts
Expand Up @@ -350,7 +350,8 @@ async function prepareTestRuns(
databaseType: "mysql",
schemaName: "ignored",
ssl: yn(process.env.MYSQL_SSL, { default: false }),
skipTables: []
skipTables: [],
tables: [],
};
break;
case "mariadb":
Expand All @@ -363,7 +364,8 @@ async function prepareTestRuns(
databaseType: "mariadb",
schemaName: "ignored",
ssl: yn(process.env.MARIADB_SSL, { default: false }),
skipTables: []
skipTables: [],
tables: []
};
break;

Expand Down
18 changes: 12 additions & 6 deletions test/utils/GeneralTestUtils.ts
Expand Up @@ -31,7 +31,8 @@ export async function createMSSQLModels(
databaseType: "mssql",
schemaName: "dbo,sch1,sch2",
ssl: yn(process.env.MSSQL_SSL, { default: false }),
skipTables: []
skipTables: [],
tables: []
};
await driver.ConnectToServer(connectionOptions);
connectionOptions.databaseName = String(process.env.MSSQL_Database);
Expand Down Expand Up @@ -83,7 +84,8 @@ export async function createPostgresModels(
databaseType: "postgres",
schemaName: "public,sch1,sch2",
ssl: yn(process.env.POSTGRES_SSL, { default: false }),
skipTables: ["spatial_ref_sys"]
skipTables: ["spatial_ref_sys"],
tables: []
};
await driver.ConnectToServer(connectionOptions);
connectionOptions.databaseName = String(process.env.POSTGRES_Database);
Expand Down Expand Up @@ -134,7 +136,8 @@ export async function createSQLiteModels(
databaseType: "sqlite",
schemaName: "",
ssl: false,
skipTables: []
skipTables: [],
tables: []
};

const connOpt: ConnectionOptions = {
Expand Down Expand Up @@ -169,7 +172,8 @@ export async function createMysqlModels(
databaseType: "mysql",
schemaName: "ignored",
ssl: yn(process.env.MYSQL_SSL, { default: false }),
skipTables: []
skipTables: [],
tables: []
};
await driver.ConnectToServer(connectionOptions);

Expand Down Expand Up @@ -212,7 +216,8 @@ export async function createMariaDBModels(
databaseType: "mariadb",
schemaName: "ignored",
ssl: yn(process.env.MARIADB_SSL, { default: false }),
skipTables: []
skipTables: [],
tables: []
};
await driver.ConnectToServer(connectionOptions);

Expand Down Expand Up @@ -257,7 +262,8 @@ export async function createOracleDBModels(
databaseType: "oracle",
schemaName: String(process.env.ORACLE_Username),
ssl: yn(process.env.ORACLE_SSL, { default: false }),
skipTables: []
skipTables: [],
tables: []
};
await driver.ConnectToServer(connectionOptions);
connectionOptions.user = String(process.env.ORACLE_Username);
Expand Down

0 comments on commit 06653f9

Please sign in to comment.