Sanitize db name for dacpac/bacpac file names (#5479)

* Sanitize db name for filename

* Add unit tests

* lower timeout to 60 seconds

* add extra coverageConfig.json and missing character check
This commit is contained in:
kisantia
2019-05-14 15:00:28 -07:00
committed by GitHub
parent be60ad6766
commit 48ba9ce175
12 changed files with 1496 additions and 6 deletions

View File

@@ -0,0 +1,34 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
const path = require('path');
import * as testRunner from 'vscodetestcover';
const suite = 'DacFx Tests';
const testOptions: any = {
ui: 'bdd',
useColors: true,
timeout: 60000
};
const coverageConfig: any = {
coverConfig: '../../coverageConfig.json'
};
if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY) {
testOptions.reporter = 'mocha-multi-reporters';
testOptions.reporterOptions = {
reporterEnabled: 'spec, mocha-junit-reporter',
mochaJunitReporterReporterOptions: {
testsuitesTitle: `${suite} ${process.platform}`,
mochaFile: path.join(process.env.BUILD_ARTIFACTSTAGINGDIRECTORY, `test-results/${process.platform}-${suite.toLowerCase().replace(/[^\w]/g, '-')}-results.xml`)
}
};
}
testRunner.configure(testOptions, coverageConfig);
export = testRunner;