From 7b6246ee59cc67f962537111e2c8f262e3e4fe00 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Thu, 29 Jun 2023 15:08:14 +0100 Subject: [PATCH] Fixes discovered by MS-SQL validator tests in QA-core, fixing custom ports being used (not default) and allowing the use of self signed certificates. Also updating an error message in line with Peters changes. --- packages/server/src/integrations/microsoftSqlServer.ts | 3 ++- qa-core/src/integrations/validators/mssql.integration.spec.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/server/src/integrations/microsoftSqlServer.ts b/packages/server/src/integrations/microsoftSqlServer.ts index d4efacea36..9c4f5d074d 100644 --- a/packages/server/src/integrations/microsoftSqlServer.ts +++ b/packages/server/src/integrations/microsoftSqlServer.ts @@ -186,10 +186,11 @@ class SqlServerIntegration extends Sql implements DatasourcePlus { try { const clientCfg: MSSQLConfig & sqlServer.config = { ...this.config, - port: +this.config, + port: +this.config.port, options: { encrypt: this.config.encrypt, enableArithAbort: true, + trustServerCertificate: true, }, } delete clientCfg.encrypt diff --git a/qa-core/src/integrations/validators/mssql.integration.spec.ts b/qa-core/src/integrations/validators/mssql.integration.spec.ts index 17f79d86ec..d8f36e8bd0 100644 --- a/qa-core/src/integrations/validators/mssql.integration.spec.ts +++ b/qa-core/src/integrations/validators/mssql.integration.spec.ts @@ -58,7 +58,7 @@ describe("datasource validators", () => { const result = await integration.testConnection() expect(result).toEqual({ connected: false, - error: "ConnectionError: Login failed for user 'sa'.", + error: "Login failed for user 'sa'.", }) }) })