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.
This commit is contained in:
parent
3e62953947
commit
7b6246ee59
|
@ -186,10 +186,11 @@ class SqlServerIntegration extends Sql implements DatasourcePlus {
|
||||||
try {
|
try {
|
||||||
const clientCfg: MSSQLConfig & sqlServer.config = {
|
const clientCfg: MSSQLConfig & sqlServer.config = {
|
||||||
...this.config,
|
...this.config,
|
||||||
port: +this.config,
|
port: +this.config.port,
|
||||||
options: {
|
options: {
|
||||||
encrypt: this.config.encrypt,
|
encrypt: this.config.encrypt,
|
||||||
enableArithAbort: true,
|
enableArithAbort: true,
|
||||||
|
trustServerCertificate: true,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
delete clientCfg.encrypt
|
delete clientCfg.encrypt
|
||||||
|
|
|
@ -58,7 +58,7 @@ describe("datasource validators", () => {
|
||||||
const result = await integration.testConnection()
|
const result = await integration.testConnection()
|
||||||
expect(result).toEqual({
|
expect(result).toEqual({
|
||||||
connected: false,
|
connected: false,
|
||||||
error: "ConnectionError: Login failed for user 'sa'.",
|
error: "Login failed for user 'sa'.",
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue