mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-21 01:25:37 -05:00
Add support for Encrypt=Strict for TDS 8.0 connections with SQL Server 2022 (#21256)
This commit is contained in:
@@ -57,6 +57,20 @@ export enum AuthenticationType {
|
||||
None = 'None'
|
||||
}
|
||||
|
||||
/*
|
||||
* Actions for the connection dialog to show/hide connection options.
|
||||
*/
|
||||
export enum Actions {
|
||||
/**
|
||||
* Shows a connection option
|
||||
*/
|
||||
Show = 'show',
|
||||
/**
|
||||
* Hides a connection option
|
||||
*/
|
||||
Hide = 'hide'
|
||||
}
|
||||
|
||||
/* CMS constants */
|
||||
export const cmsProviderName = 'MSSQL-CMS';
|
||||
|
||||
|
||||
@@ -214,6 +214,21 @@ suite('SQL ProviderConnectionInfo tests', () => {
|
||||
assert.strictEqual(conn.options['encrypt'], 'true');
|
||||
});
|
||||
|
||||
test('constructor should initialize the options with encrypt strict', () => {
|
||||
let options: { [key: string]: string } = {};
|
||||
options['encrypt'] = 'strict';
|
||||
let conn2 = Object.assign({}, connectionProfile, { options: options });
|
||||
let conn = new ProviderConnectionInfo(capabilitiesService, conn2);
|
||||
|
||||
assert.strictEqual(conn.connectionName, conn2.connectionName);
|
||||
assert.strictEqual(conn.serverName, conn2.serverName);
|
||||
assert.strictEqual(conn.databaseName, conn2.databaseName);
|
||||
assert.strictEqual(conn.authenticationType, conn2.authenticationType);
|
||||
assert.strictEqual(conn.password, conn2.password);
|
||||
assert.strictEqual(conn.userName, conn2.userName);
|
||||
assert.strictEqual(conn.options['encrypt'], 'strict');
|
||||
});
|
||||
|
||||
test('getOptionsKey should create a valid unique id', () => {
|
||||
let conn = new ProviderConnectionInfo(capabilitiesService, connectionProfile);
|
||||
// **IMPORTANT** This should NEVER change without thorough review and consideration of side effects. This key controls
|
||||
|
||||
Reference in New Issue
Block a user