Quick fix for QA-core tests, when encrypt is undefined for MS-SQL, it defaults to true, need to be aware of this so can set trustServerCertificate correctly. Also fixing the naming of a test.

This commit is contained in:
mike12345567 2023-06-30 12:05:18 +01:00
parent e17827e0d3
commit 4428678ebd
2 changed files with 4 additions and 3 deletions

View File

@ -184,12 +184,13 @@ class SqlServerIntegration extends Sql implements DatasourcePlus {
async connect() {
try {
const encrypt = this.config.encrypt
// if encrypt is undefined, then default is to encrypt
const encrypt = this.config.encrypt === undefined || this.config.encrypt
const clientCfg: MSSQLConfig & sqlServer.config = {
...this.config,
port: +this.config.port,
options: {
encrypt: encrypt,
encrypt,
enableArithAbort: true,
},
}

View File

@ -5,7 +5,7 @@ import mssql from "../../../../packages/server/src/integrations/microsoftSqlServ
jest.unmock("mssql")
describe("getExternalSchema", () => {
describe("postgres", () => {
describe("mssql", () => {
let config: any
beforeAll(async () => {