mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-18 01:25:37 -05:00
fix publish profile with connection string ending in semicolon not loading (#14797)
This commit is contained in:
@@ -9,12 +9,12 @@ import * as testUtils from './testUtils';
|
||||
import * as sql from '../models/dataSources/sqlConnectionStringSource';
|
||||
import * as dataSources from '../models/dataSources/dataSources';
|
||||
|
||||
describe.skip('Data Sources: DataSource operations', function (): void {
|
||||
describe('Data Sources: DataSource operations', function (): void {
|
||||
before(async function () : Promise<void> {
|
||||
await baselines.loadBaselines();
|
||||
});
|
||||
|
||||
it('Should read DataSources from datasource.json', async function (): Promise<void> {
|
||||
it.skip('Should read DataSources from datasource.json', async function (): Promise<void> {
|
||||
const dataSourcePath = await testUtils.createTestDataSources(baselines.openDataSourcesBaseline);
|
||||
const dataSourceList = await dataSources.load(dataSourcePath);
|
||||
|
||||
@@ -31,4 +31,10 @@ describe.skip('Data Sources: DataSource operations', function (): void {
|
||||
should((dataSourceList[2] as sql.SqlConnectionDataSource).integratedSecurity).equal(false);
|
||||
should((dataSourceList[2] as sql.SqlConnectionDataSource).azureMFA).equal(true);
|
||||
});
|
||||
|
||||
it ('Should be able to create sql data source from connection strings with and without ending semicolon', function (): void {
|
||||
should.doesNotThrow(() => new sql.SqlConnectionDataSource('no ending semicolon', 'Data Source=(LOCAL);Initial Catalog=testdb;User id=sa;Password=PLACEHOLDER'));
|
||||
should.doesNotThrow(() => new sql.SqlConnectionDataSource('ending in semicolon', 'Data Source=(LOCAL);Initial Catalog=testdb;User id=sa;Password=PLACEHOLDER;'));
|
||||
should.throws(() => new sql.SqlConnectionDataSource('invalid extra equals sign', 'Data Source=(LOCAL);Initial Catalog=testdb=extra;User id=sa;Password=PLACEHOLDER'));
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user