From 0a83f02510b59ad1032ebda06104a5590d78a109 Mon Sep 17 00:00:00 2001 From: Kononnable Date: Sun, 14 May 2017 15:34:41 +0200 Subject: [PATCH] travis CI fix3 --- .travis.yml | 12 ++++-------- test/integration/integration.test.ts | 22 +++++++++++----------- 2 files changed, 15 insertions(+), 19 deletions(-) diff --git a/.travis.yml b/.travis.yml index 19682a6..d807150 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,17 +12,13 @@ services: - docker env: - - MSSQLSkip=0 MSSQLHost=localhost MSSQLPort=1433 MSSQLUsername=sa MSSQLPassword=!Passw0rd MSSQLDatabase=test + - MSSQL_Skip=0 MSSQL_Host=localhost MSSQL_Port=1433 MSSQL_Username=sa MSSQL_Password=!Passw0rd MSSQL_Database=tempdb before_install: - docker pull microsoft/mssql-server-linux - - docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=!Passw0rd' -p 1433:1433 -d microsoft/mssql-server-linux - - curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - - - curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | sudo tee /etc/apt/sources.list.d/msprod.list - - sudo apt-get update - - sudo apt-get install mssql-tools - + - docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=!Passw0rd' -p 1433:1433 --name mssql -d microsoft/mssql-server-linux + + before_script: - npm run typings-install - tsc - - sqlcmd -S $MSSQLHost,$MSSQLPort -U $MSSQLUsername -P $MSSQLPassword -Q 'CREATE DATABASE TEST' \ No newline at end of file diff --git a/test/integration/integration.test.ts b/test/integration/integration.test.ts index b75294e..85aad36 100644 --- a/test/integration/integration.test.ts +++ b/test/integration/integration.test.ts @@ -17,7 +17,7 @@ describe("integration tests", async function () { let files = fs.readdirSync(examplesPath) let dbDrivers: DriverType[] = [] - if (process.env.MSSQLSkip=='0') dbDrivers.push('mssql') + if (process.env.MSSQL_Skip=='0') dbDrivers.push('mssql') for (let folder of files) { @@ -31,12 +31,12 @@ describe("integration tests", async function () { let connOpt: ConnectionOptions = { driver: { - database: process.env.MSSQLDatabase, - host: process.env.MSSQLHost, - password: process.env.MSSQLPassword, + database: process.env.MSSQL_Database, + host: process.env.MSSQL_Host, + password: process.env.MSSQL_Password, type: 'mssql', - username: process.env.MSSQLUsername, - port: process.env.MSSQLPort + username: process.env.MSSQL_Username, + port: process.env.MSSQL_Port }, dropSchemaOnConnection: true, autoSchemaSync: true, @@ -54,11 +54,11 @@ describe("integration tests", async function () { let engine = new Engine( driver, { //TODO:get data from env - host: process.env.MSSQLHost, - port: process.env.MSSQLPort, - databaseName: process.env.MSSQLDatabase, - user: process.env.MSSQLUsername, - password: process.env.MSSQLPassword, + host: process.env.MSSQL_Host, + port: process.env.MSSQL_Port, + databaseName: process.env.MSSQL_Database, + user: process.env.MSSQL_Username, + password: process.env.MSSQL_Password, databaseType: 'mssql', resultsPath: resultsPath });