mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-13 17:22:15 -05:00
Add query-history tests (#19923)
This commit is contained in:
20
extensions/query-history/coverConfig.json
Normal file
20
extensions/query-history/coverConfig.json
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"enabled": true,
|
||||
"relativeSourcePath": "..",
|
||||
"relativeCoverageDir": "../../coverage",
|
||||
"ignorePatterns": [
|
||||
"**/node_modules/**",
|
||||
"**/test/**",
|
||||
"main.js"
|
||||
],
|
||||
"reports": [
|
||||
"cobertura",
|
||||
"lcov",
|
||||
"json"
|
||||
],
|
||||
"verbose": false,
|
||||
"remapOptions": {
|
||||
"basePath": "..",
|
||||
"useAbsolutePaths": true
|
||||
}
|
||||
}
|
||||
@@ -177,7 +177,12 @@
|
||||
},
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"@types/node": "^12.11.7"
|
||||
"@microsoft/azdata-test": "^1.5.2",
|
||||
"@microsoft/vscodetestcover": "^1.2.1",
|
||||
"@types/mocha": "^7.0.2",
|
||||
"@types/node": "^12.11.7",
|
||||
"should": "^13.2.3",
|
||||
"typemoq": "^2.1.0"
|
||||
},
|
||||
"__metadata": {
|
||||
"id": "55",
|
||||
|
||||
48
extensions/query-history/src/test/index.ts
Normal file
48
extensions/query-history/src/test/index.ts
Normal file
@@ -0,0 +1,48 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as path from 'path';
|
||||
import * as testRunner from '@microsoft/vscodetestcover';
|
||||
|
||||
const suite = 'admin-tool-ext-win Extension Tests';
|
||||
|
||||
const mochaOptions: any = {
|
||||
ui: 'bdd',
|
||||
useColors: true,
|
||||
timeout: 10000
|
||||
};
|
||||
|
||||
// set relevant mocha options from the environment
|
||||
if (process.env.ADS_TEST_GREP) {
|
||||
mochaOptions.grep = process.env.ADS_TEST_GREP;
|
||||
console.log(`setting options.grep to: ${mochaOptions.grep}`);
|
||||
}
|
||||
if (process.env.ADS_TEST_INVERT_GREP) {
|
||||
mochaOptions.invert = parseInt(process.env.ADS_TEST_INVERT_GREP);
|
||||
console.log(`setting options.invert to: ${mochaOptions.invert}`);
|
||||
}
|
||||
if (process.env.ADS_TEST_TIMEOUT) {
|
||||
mochaOptions.timeout = parseInt(process.env.ADS_TEST_TIMEOUT);
|
||||
console.log(`setting options.timeout to: ${mochaOptions.timeout}`);
|
||||
}
|
||||
if (process.env.ADS_TEST_RETRIES) {
|
||||
mochaOptions.retries = parseInt(process.env.ADS_TEST_RETRIES);
|
||||
console.log(`setting options.retries to: ${mochaOptions.retries}`);
|
||||
}
|
||||
|
||||
if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY) {
|
||||
mochaOptions.reporter = 'mocha-multi-reporters';
|
||||
mochaOptions.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(mochaOptions, { coverConfig: '../../coverConfig.json' });
|
||||
|
||||
export = testRunner;
|
||||
209
extensions/query-history/src/test/queryHistoryProvider.test.ts
Normal file
209
extensions/query-history/src/test/queryHistoryProvider.test.ts
Normal file
@@ -0,0 +1,209 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as azdata from 'azdata';
|
||||
import * as vscode from 'vscode';
|
||||
import * as should from 'should';
|
||||
import 'mocha';
|
||||
import * as sinon from 'sinon';
|
||||
import * as azdataTest from '@microsoft/azdata-test';
|
||||
import { QueryHistoryProvider } from '../queryHistoryProvider';
|
||||
import { QueryHistoryNode } from '../queryHistoryNode';
|
||||
import { EOL } from 'os';
|
||||
|
||||
describe('QueryHistoryProvider', () => {
|
||||
|
||||
let testProvider: QueryHistoryProvider;
|
||||
let testListener: azdata.queryeditor.QueryEventListener;
|
||||
let textDocumentSandbox: sinon.SinonSandbox;
|
||||
const testUri = vscode.Uri.parse('untitled://query1');
|
||||
|
||||
beforeEach(function (): void {
|
||||
sinon.stub(azdata.queryeditor, 'registerQueryEventListener').callsFake((listener: azdata.queryeditor.QueryEventListener) => {
|
||||
testListener = listener;
|
||||
return { dispose: (): void => { } };
|
||||
});
|
||||
textDocumentSandbox = sinon.createSandbox();
|
||||
textDocumentSandbox.replaceGetter(vscode.workspace, 'textDocuments', () => [azdataTest.mocks.vscode.createTextDocumentMock(testUri).object]);
|
||||
const getConnectionStub = sinon.stub(azdata.connection, 'getConnection');
|
||||
getConnectionStub.resolves(<any>{});
|
||||
testProvider = new QueryHistoryProvider();
|
||||
});
|
||||
|
||||
afterEach(function (): void {
|
||||
sinon.restore();
|
||||
});
|
||||
|
||||
it('There should be no children initially', function () {
|
||||
const children = testProvider.getChildren();
|
||||
should(children).length(0);
|
||||
});
|
||||
|
||||
it('Clearing empty list does not throw', function () {
|
||||
testProvider.clearAll();
|
||||
const children = testProvider.getChildren();
|
||||
should(children).length(0);
|
||||
});
|
||||
|
||||
it('non-queryStop events don\'t cause children to be added', async function () {
|
||||
const types: azdata.queryeditor.QueryEventType[] = ['executionPlan', 'queryStart', 'queryUpdate', 'visualize'];
|
||||
for (const type of types) {
|
||||
await fireQueryEventAndWaitForRefresh(type, <any>{ uri: testUri.toString() }, { messages: [], batchRanges: [] }, 2000);
|
||||
const children = testProvider.getChildren();
|
||||
should(children).length(0, `Should have no children after ${type} event`);
|
||||
}
|
||||
});
|
||||
|
||||
it('queryStop events cause children to be added', async function () {
|
||||
await fireQueryEventAndWaitForRefresh('queryStop', <any>{ uri: testUri.toString() }, { messages: [], batchRanges: [] });
|
||||
const children = testProvider.getChildren();
|
||||
should(children).length(1, 'Should have one child after adding item');
|
||||
|
||||
await fireQueryEventAndWaitForRefresh('queryStop', <any>{ uri: testUri.toString() }, { messages: [], batchRanges: [] });
|
||||
should(children).length(2, 'Should have two children after adding another item');
|
||||
});
|
||||
|
||||
it('multiple ranges are combined', async function () {
|
||||
const rangeWithContent1: azdataTest.mocks.vscode.RangeWithContent = { range: new vscode.Range(new vscode.Position(0, 0), new vscode.Position(2, 0)), content: 'SELECT 1' };
|
||||
const rangeWithContent2: azdataTest.mocks.vscode.RangeWithContent = { range: new vscode.Range(new vscode.Position(3, 0), new vscode.Position(3, 5)), content: 'SELECT 2' };
|
||||
const textDocumentMock = azdataTest.mocks.vscode.createTextDocumentMock(testUri, [rangeWithContent1, rangeWithContent2]);
|
||||
textDocumentSandbox.restore();
|
||||
textDocumentSandbox.replaceGetter(vscode.workspace, 'textDocuments', () => [textDocumentMock.object]);
|
||||
await fireQueryEventAndWaitForRefresh('queryStop', <any>{ uri: testUri.toString() }, {
|
||||
messages: [],
|
||||
batchRanges: [rangeWithContent1.range, rangeWithContent2.range]
|
||||
});
|
||||
const children = testProvider.getChildren();
|
||||
should(children).length(1, 'Should have one child after adding item');
|
||||
should(children[0].queryText).be.equal(`${rangeWithContent1.content}${EOL}${rangeWithContent2.content}`, 'node content should be combined from both source ranges');
|
||||
});
|
||||
|
||||
it('event with errors is marked as error', async function () {
|
||||
const message1: azdata.queryeditor.QueryMessage = { message: 'Message 1', isError: false };
|
||||
const message2: azdata.queryeditor.QueryMessage = { message: 'Error message', isError: true };
|
||||
const message3: azdata.queryeditor.QueryMessage = { message: 'Message 2', isError: false };
|
||||
await fireQueryEventAndWaitForRefresh('queryStop', <any>{ uri: testUri.toString() }, { messages: [ message1, message2, message3 ], batchRanges: []});
|
||||
const children = testProvider.getChildren();
|
||||
should(children).length(1, 'Should have one child after adding item');
|
||||
should((<vscode.ThemeIcon>children[0].iconPath).id).be.equal('error', 'Event with errors should have error icon');
|
||||
});
|
||||
|
||||
it('event without errors is marked as success', async function () {
|
||||
const message1: azdata.queryeditor.QueryMessage = { message: 'Message 1', isError: false };
|
||||
const message2: azdata.queryeditor.QueryMessage = { message: 'Message 2', isError: false };
|
||||
const message3: azdata.queryeditor.QueryMessage = { message: 'Message 3', isError: false };
|
||||
await fireQueryEventAndWaitForRefresh('queryStop', <any>{ uri: testUri.toString() }, { messages: [ message1, message2, message3 ], batchRanges: []});
|
||||
const children = testProvider.getChildren();
|
||||
should(children).length(1, 'Should have one child after adding item');
|
||||
should((<vscode.ThemeIcon>children[0].iconPath).id).be.equal('check', 'Event without errors should have check icon');
|
||||
});
|
||||
|
||||
it('queryStop events from unknown document are ignored', async function () {
|
||||
const unknownUri = vscode.Uri.parse('untitled://query2');
|
||||
// Since we didn't find the text document we'll never update the node list so add a timeout since that event will never fire
|
||||
await fireQueryEventAndWaitForRefresh('queryStop', <any>{ uri: unknownUri.toString() }, { messages: [], batchRanges: [] }, 2000);
|
||||
const children = testProvider.getChildren();
|
||||
should(children).length(0, 'Should not have any children');
|
||||
});
|
||||
|
||||
it('can clear all with one child', async function () {
|
||||
await fireQueryEventAndWaitForRefresh('queryStop', <any>{ uri: testUri.toString() }, { messages: [], batchRanges: [] });
|
||||
let children = testProvider.getChildren();
|
||||
should(children).length(1, 'Should have one child after adding item');
|
||||
|
||||
await waitForNodeRefresh(() => testProvider.clearAll());
|
||||
children = testProvider.getChildren();
|
||||
should(children).length(0, 'Should have no children after clearing');
|
||||
});
|
||||
|
||||
it('can clear all with multiple children', async function () {
|
||||
await fireQueryEventAndWaitForRefresh('queryStop', <any>{ uri: testUri.toString() }, { messages: [], batchRanges: [] });
|
||||
await fireQueryEventAndWaitForRefresh('queryStop', <any>{ uri: testUri.toString() }, { messages: [], batchRanges: [] });
|
||||
await fireQueryEventAndWaitForRefresh('queryStop', <any>{ uri: testUri.toString() }, { messages: [], batchRanges: [] });
|
||||
let children = testProvider.getChildren();
|
||||
should(children).length(3, 'Should have 3 children after adding item');
|
||||
|
||||
await waitForNodeRefresh(() => testProvider.clearAll());
|
||||
children = testProvider.getChildren();
|
||||
should(children).length(0, 'Should have no children after clearing');
|
||||
});
|
||||
|
||||
it('delete node when no nodes doesn\'t throw', async function () {
|
||||
const testNode: QueryHistoryNode = { queryText: 'SELECT 1', connectionProfile: azdataTest.stubs.connectionProfile.createConnectionProfile() };
|
||||
await waitForNodeRefresh(() => testProvider.deleteNode(testNode));
|
||||
const children = testProvider.getChildren();
|
||||
should(children).length(0, 'Should have no children after deleting node');
|
||||
});
|
||||
|
||||
it('delete node that doesn\'t exist doesn\'t throw', async function () {
|
||||
await fireQueryEventAndWaitForRefresh('queryStop', <any>{ uri: testUri.toString() }, { messages: [], batchRanges: [] });
|
||||
let children = testProvider.getChildren();
|
||||
should(children).length(1, 'Should have 1 child initially');
|
||||
|
||||
const testNode: QueryHistoryNode = { queryText: 'SELECT 1', connectionProfile: azdataTest.stubs.connectionProfile.createConnectionProfile() };
|
||||
await waitForNodeRefresh(() => testProvider.deleteNode(testNode));
|
||||
children = testProvider.getChildren();
|
||||
should(children).length(1, 'Should still have 1 child after deleting node');
|
||||
});
|
||||
|
||||
it('can delete single node', async function () {
|
||||
await fireQueryEventAndWaitForRefresh('queryStop', <any>{ uri: testUri.toString() }, { messages: [], batchRanges: [] });
|
||||
await fireQueryEventAndWaitForRefresh('queryStop', <any>{ uri: testUri.toString() }, { messages: [], batchRanges: [] });
|
||||
await fireQueryEventAndWaitForRefresh('queryStop', <any>{ uri: testUri.toString() }, { messages: [], batchRanges: [] });
|
||||
const firstChildren = testProvider.getChildren();
|
||||
should(firstChildren).length(3, 'Should have 3 children initially');
|
||||
|
||||
let nodeToDelete: QueryHistoryNode = firstChildren[1];
|
||||
await waitForNodeRefresh(() => testProvider.deleteNode(nodeToDelete));
|
||||
const secondChildren = testProvider.getChildren();
|
||||
should(secondChildren).length(2, 'Should still have 2 child after deleting node');
|
||||
should(secondChildren[0]).be.equal(firstChildren[0], 'First node should still exist after deleting first node');
|
||||
should(secondChildren[1]).be.equal(firstChildren[2], 'Second node should still exist after deleting first node');
|
||||
|
||||
nodeToDelete = secondChildren[0];
|
||||
await waitForNodeRefresh(() => testProvider.deleteNode(nodeToDelete));
|
||||
const thirdChildren = testProvider.getChildren();
|
||||
should(thirdChildren).length(1, 'Should still have 1 child after deleting node');
|
||||
should(thirdChildren[0]).be.equal(secondChildren[1], 'Second node should still exist after deleting second node');
|
||||
|
||||
nodeToDelete = thirdChildren[0];
|
||||
await waitForNodeRefresh(() => testProvider.deleteNode(nodeToDelete));
|
||||
const fourthChildren = testProvider.getChildren();
|
||||
should(fourthChildren).length(0, 'Should have no children after deleting all nodes');
|
||||
});
|
||||
|
||||
it('pausing capture causes children not to be added', async function () {
|
||||
await fireQueryEventAndWaitForRefresh('queryStop', <any>{ uri: testUri.toString() }, { messages: [], batchRanges: [] });
|
||||
const children = testProvider.getChildren();
|
||||
should(children).length(1, 'Should have one child after adding initial item');
|
||||
|
||||
await testProvider.setCaptureEnabled(false);
|
||||
|
||||
// Add timeout since the item is never added, thus never triggering the event
|
||||
await fireQueryEventAndWaitForRefresh('queryStop', <any>{ uri: testUri.toString() }, { messages: [], batchRanges: [] }, 2000);
|
||||
should(children).length(1, 'Should still have 1 child after adding item when capture paused');
|
||||
|
||||
await testProvider.setCaptureEnabled(true);
|
||||
|
||||
await fireQueryEventAndWaitForRefresh('queryStop', <any>{ uri: testUri.toString() }, { messages: [], batchRanges: [] });
|
||||
should(children).length(2, 'Should have 2 child after adding item when capture was resumed');
|
||||
});
|
||||
|
||||
async function fireQueryEventAndWaitForRefresh(type: azdata.queryeditor.QueryEventType, document: azdata.queryeditor.QueryDocument, queryInfo: azdata.queryeditor.QueryInfo, timeoutMs?: number): Promise<void> {
|
||||
await waitForNodeRefresh(() => testListener.onQueryEvent(type, document, undefined, queryInfo), timeoutMs);
|
||||
}
|
||||
|
||||
async function waitForNodeRefresh(func: Function, timeoutMs?: number): Promise<void> {
|
||||
const promises: Promise<any>[] = [azdataTest.helpers.eventToPromise(testProvider.onDidChangeTreeData)];
|
||||
const timeoutPromise = timeoutMs ? new Promise<void>(r => setTimeout(() => r(), timeoutMs)) : undefined;
|
||||
if (timeoutPromise) {
|
||||
promises.push(timeoutPromise);
|
||||
}
|
||||
func();
|
||||
await Promise.race(promises);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -472,7 +472,7 @@
|
||||
"@types/semver": "^7.3.1",
|
||||
"@types/sinon": "^9.0.8",
|
||||
"@types/yamljs": "0.2.30",
|
||||
"@microsoft/azdata-test": "^1.5.1",
|
||||
"@microsoft/azdata-test": "^1.5.2",
|
||||
"mocha": "^7.1.1",
|
||||
"mocha-junit-reporter": "^1.17.0",
|
||||
"mocha-multi-reporters": "^1.1.7",
|
||||
|
||||
@@ -11,24 +11,22 @@ import { initializeWizardPage, InputComponent, InputComponentInfo, Validator, Wi
|
||||
import { FieldType } from '../../../interfaces';
|
||||
import { IToolsService } from '../../../services/toolsService';
|
||||
import { Deferred } from '../../utils';
|
||||
import { createModelViewMock } from '@microsoft/azdata-test/out/mocks/modelView/modelViewMock';
|
||||
import { StubCheckbox } from '@microsoft/azdata-test/out/stubs/modelView/stubCheckbox';
|
||||
import { StubInputBox } from '@microsoft/azdata-test/out/stubs/modelView/stubInputBox';
|
||||
import * as azdataTest from '@microsoft/azdata-test';
|
||||
import * as should from 'should';
|
||||
import * as sinon from 'sinon';
|
||||
|
||||
describe('WizardPage', () => {
|
||||
let stubCheckbox: StubCheckbox;
|
||||
let stubInputBox: StubInputBox;
|
||||
let stubCheckbox: azdataTest.stubs.modelView.StubCheckbox;
|
||||
let stubInputBox: azdataTest.stubs.modelView.StubInputBox;
|
||||
let testWizardPage: WizardPageContext;
|
||||
let contentRegistered: Deferred<void>;
|
||||
|
||||
before(function () {
|
||||
contentRegistered = new Deferred<void>();
|
||||
const mockWizardPage = TypeMoq.Mock.ofType<azdata.window.WizardPage>();
|
||||
stubCheckbox = new StubCheckbox();
|
||||
stubInputBox = new StubInputBox();
|
||||
const mockModelView = createModelViewMock({
|
||||
stubCheckbox = new azdataTest.stubs.modelView.StubCheckbox();
|
||||
stubInputBox = new azdataTest.stubs.modelView.StubInputBox();
|
||||
const mockModelView = azdataTest.mocks.modelView.createModelViewMock({
|
||||
checkBox: () => stubCheckbox,
|
||||
inputBox: () => stubInputBox
|
||||
});
|
||||
|
||||
@@ -227,10 +227,10 @@
|
||||
resolved "https://registry.yarnpkg.com/@microsoft/applicationinsights-shims/-/applicationinsights-shims-2.0.1.tgz#5d72fb7aaf4056c4fda54f9d7c93ccf8ca9bcbfd"
|
||||
integrity sha512-G0MXf6R6HndRbDy9BbEj0zrLeuhwt2nsXk2zKtF0TnYo39KgYqhYC2ayIzKPTm2KAE+xzD7rgyLdZnrcRvt9WQ==
|
||||
|
||||
"@microsoft/azdata-test@^1.5.1":
|
||||
version "1.5.1"
|
||||
resolved "https://registry.yarnpkg.com/@microsoft/azdata-test/-/azdata-test-1.5.1.tgz#e61aeb81f3291563f250e6b0c712a45aa335de94"
|
||||
integrity sha512-3B5iz0WU5TCKOs420zRNk4LWi2n5W64ZLJMu81X/yFFmnCbjhWwKE4xgTBZTuzmzg372bNNrHm9zHZcr3lm1RA==
|
||||
"@microsoft/azdata-test@^1.5.2":
|
||||
version "1.5.2"
|
||||
resolved "https://registry.yarnpkg.com/@microsoft/azdata-test/-/azdata-test-1.5.2.tgz#0a750eed6c686eaf98e63db580f119916a083d6a"
|
||||
integrity sha512-m1WVNxkCqU8nkaRB0Q/DEq1wHej0Ev3bfyEmsPgX9znymY7MD9c1l6kRoHtPPmsYYDEjcCxO2QXUJAsNUeAKwg==
|
||||
dependencies:
|
||||
http-proxy-agent "^2.1.0"
|
||||
https-proxy-agent "^2.2.4"
|
||||
|
||||
@@ -36,6 +36,7 @@ if "%INTEGRATION_TEST_ELECTRON_PATH%"=="" (
|
||||
compile-extension:machine-learning^
|
||||
compile-extension:mssql^
|
||||
compile-extension:notebook^
|
||||
compile-extension:query-history^
|
||||
compile-extension:resource-deployment^
|
||||
compile-extension:sql-bindings^
|
||||
compile-extension:sql-database-projects
|
||||
@@ -92,26 +93,16 @@ echo *** starting dacpac tests ***
|
||||
echo *****************************
|
||||
call "%INTEGRATION_TEST_ELECTRON_PATH%" --extensionDevelopmentPath=%~dp0\..\extensions\dacpac --extensionTestsPath=%~dp0\..\extensions\dacpac\out\test %ALL_PLATFORMS_API_TESTS_EXTRA_ARGS%
|
||||
|
||||
echo ********************************************
|
||||
echo *** starting data-workspace tests ***
|
||||
echo ********************************************
|
||||
call "%INTEGRATION_TEST_ELECTRON_PATH%" --extensionDevelopmentPath=%~dp0\..\extensions\data-workspace --extensionTestsPath=%~dp0\..\extensions\data-workspace\out\test %ALL_PLATFORMS_API_TESTS_EXTRA_ARGS%
|
||||
|
||||
echo *****************************
|
||||
echo *** starting import tests ***
|
||||
echo *****************************
|
||||
call "%INTEGRATION_TEST_ELECTRON_PATH%" --extensionDevelopmentPath=%~dp0\..\extensions\import --extensionTestsPath=%~dp0\..\extensions\import\out\test %ALL_PLATFORMS_API_TESTS_EXTRA_ARGS%
|
||||
|
||||
echo *************************************
|
||||
echo *** starting schema compare tests ***
|
||||
echo *************************************
|
||||
call "%INTEGRATION_TEST_ELECTRON_PATH%" --extensionDevelopmentPath=%~dp0\..\extensions\schema-compare --extensionTestsPath=%~dp0\..\extensions\schema-compare\out\test %ALL_PLATFORMS_API_TESTS_EXTRA_ARGS%
|
||||
|
||||
echo *******************************
|
||||
echo *** starting notebook tests ***
|
||||
echo *******************************
|
||||
call "%INTEGRATION_TEST_ELECTRON_PATH%" --extensionDevelopmentPath=%~dp0\..\extensions\notebook --extensionTestsPath=%~dp0\..\extensions\notebook\out\test %ALL_PLATFORMS_API_TESTS_EXTRA_ARGS%
|
||||
|
||||
echo ******************************************
|
||||
echo *** starting resource deployment tests ***
|
||||
echo ******************************************
|
||||
call "%INTEGRATION_TEST_ELECTRON_PATH%" --extensionDevelopmentPath=%~dp0\..\extensions\resource-deployment --extensionTestsPath=%~dp0\..\extensions\resource-deployment\out\test %ALL_PLATFORMS_API_TESTS_EXTRA_ARGS%
|
||||
|
||||
echo *******************************
|
||||
echo *** starting machine-learning tests ***
|
||||
echo *******************************
|
||||
@@ -122,6 +113,26 @@ REM echo *** starting mssql tests ***
|
||||
REM echo ******************************************
|
||||
REM call "%INTEGRATION_TEST_ELECTRON_PATH%" --extensionDevelopmentPath=%~dp0\..\extensions\mssql --extensionTestsPath=%~dp0\..\extensions\mssql\out\test %ALL_PLATFORMS_API_TESTS_EXTRA_ARGS%
|
||||
|
||||
echo *******************************
|
||||
echo *** starting notebook tests ***
|
||||
echo *******************************
|
||||
call "%INTEGRATION_TEST_ELECTRON_PATH%" --extensionDevelopmentPath=%~dp0\..\extensions\notebook --extensionTestsPath=%~dp0\..\extensions\notebook\out\test %ALL_PLATFORMS_API_TESTS_EXTRA_ARGS%
|
||||
|
||||
echo *******************************
|
||||
echo *** starting query-history tests ***
|
||||
echo *******************************
|
||||
call "%INTEGRATION_TEST_ELECTRON_PATH%" --extensionDevelopmentPath=%~dp0\..\extensions\query-history --extensionTestsPath=%~dp0\..\extensions\query-history\out\test %ALL_PLATFORMS_API_TESTS_EXTRA_ARGS%
|
||||
|
||||
echo ******************************************
|
||||
echo *** starting resource deployment tests ***
|
||||
echo ******************************************
|
||||
call "%INTEGRATION_TEST_ELECTRON_PATH%" --extensionDevelopmentPath=%~dp0\..\extensions\resource-deployment --extensionTestsPath=%~dp0\..\extensions\resource-deployment\out\test %ALL_PLATFORMS_API_TESTS_EXTRA_ARGS%
|
||||
|
||||
echo *************************************
|
||||
echo *** starting schema compare tests ***
|
||||
echo *************************************
|
||||
call "%INTEGRATION_TEST_ELECTRON_PATH%" --extensionDevelopmentPath=%~dp0\..\extensions\schema-compare --extensionTestsPath=%~dp0\..\extensions\schema-compare\out\test %ALL_PLATFORMS_API_TESTS_EXTRA_ARGS%
|
||||
|
||||
echo ********************************************
|
||||
echo *** starting sql-bindings tests ***
|
||||
echo ********************************************
|
||||
@@ -132,11 +143,6 @@ echo *** starting sql-database-projects tests ***
|
||||
echo ********************************************
|
||||
call "%INTEGRATION_TEST_ELECTRON_PATH%" --extensionDevelopmentPath=%~dp0\..\extensions\sql-database-projects --extensionTestsPath=%~dp0\..\extensions\sql-database-projects\out\test %ALL_PLATFORMS_API_TESTS_EXTRA_ARGS%
|
||||
|
||||
echo ********************************************
|
||||
echo *** starting data-workspace tests ***
|
||||
echo ********************************************
|
||||
call "%INTEGRATION_TEST_ELECTRON_PATH%" --extensionDevelopmentPath=%~dp0\..\extensions\data-workspace --extensionTestsPath=%~dp0\..\extensions\data-workspace\out\test %ALL_PLATFORMS_API_TESTS_EXTRA_ARGS%
|
||||
|
||||
if %errorlevel% neq 0 exit /b %errorlevel%
|
||||
|
||||
if "%NO_CLEANUP%"=="" (
|
||||
|
||||
@@ -19,9 +19,10 @@ const extensionList = [
|
||||
'dacpac',
|
||||
'data-workspace',
|
||||
'import',
|
||||
'machine-learning',
|
||||
//'mssql',
|
||||
'notebook',
|
||||
'machine-learning',
|
||||
'query-history',
|
||||
'resource-deployment',
|
||||
'schema-compare',
|
||||
'sql-bindings',
|
||||
|
||||
@@ -58,6 +58,7 @@ else
|
||||
compile-extension:machine-learning \
|
||||
compile-extension:mssql \
|
||||
compile-extension:notebook \
|
||||
compile-extension:query-history \
|
||||
compile-extension:resource-deployment \
|
||||
compile-extension:sql-bindings \
|
||||
compile-extension:sql-database-projects
|
||||
@@ -125,26 +126,16 @@ echo *** starting dacpac tests ***
|
||||
echo *****************************
|
||||
"$INTEGRATION_TEST_ELECTRON_PATH" $LINUX_EXTRA_ARGS --extensionDevelopmentPath=$ROOT/extensions/dacpac --extensionTestsPath=$ROOT/extensions/dacpac/out/test $ALL_PLATFORMS_API_TESTS_EXTRA_ARGS
|
||||
|
||||
echo ********************************************
|
||||
echo *** starting data-workspace tests ***
|
||||
echo ********************************************
|
||||
"$INTEGRATION_TEST_ELECTRON_PATH" $LINUX_EXTRA_ARGS --extensionDevelopmentPath=$ROOT/extensions/data-workspace --extensionTestsPath=$ROOT/extensions/data-workspace/out/test $ALL_PLATFORMS_API_TESTS_EXTRA_ARGS
|
||||
|
||||
echo *****************************
|
||||
echo *** starting import tests ***
|
||||
echo *****************************
|
||||
"$INTEGRATION_TEST_ELECTRON_PATH" $LINUX_EXTRA_ARGS --extensionDevelopmentPath=$ROOT/extensions/import --extensionTestsPath=$ROOT/extensions/import/out/test $ALL_PLATFORMS_API_TESTS_EXTRA_ARGS
|
||||
|
||||
echo *************************************
|
||||
echo *** starting schema compare tests ***
|
||||
echo *************************************
|
||||
"$INTEGRATION_TEST_ELECTRON_PATH" $LINUX_EXTRA_ARGS --extensionDevelopmentPath=$ROOT/extensions/schema-compare --extensionTestsPath=$ROOT/extensions/schema-compare/out/test $ALL_PLATFORMS_API_TESTS_EXTRA_ARGS
|
||||
|
||||
echo *******************************
|
||||
echo *** starting notebook tests ***
|
||||
echo *******************************
|
||||
"$INTEGRATION_TEST_ELECTRON_PATH" $LINUX_EXTRA_ARGS --extensionDevelopmentPath=$ROOT/extensions/notebook --extensionTestsPath=$ROOT/extensions/notebook/out/test $ALL_PLATFORMS_API_TESTS_EXTRA_ARGS
|
||||
|
||||
echo ******************************************
|
||||
echo *** starting resource deployment tests ***
|
||||
echo ******************************************
|
||||
"$INTEGRATION_TEST_ELECTRON_PATH" $LINUX_EXTRA_ARGS --extensionDevelopmentPath=$ROOT/extensions/resource-deployment --extensionTestsPath=$ROOT/extensions/resource-deployment/out/test $ALL_PLATFORMS_API_TESTS_EXTRA_ARGS
|
||||
|
||||
echo ************************************************
|
||||
echo *** starting machine-learning tests ***
|
||||
echo ************************************************
|
||||
@@ -155,22 +146,36 @@ echo ************************************************
|
||||
# echo ******************************************
|
||||
# "$INTEGRATION_TEST_ELECTRON_PATH" $LINUX_EXTRA_ARGS --extensionDevelopmentPath=$ROOT/extensions/mssql --extensionTestsPath=$ROOT/extensions/mssql/out/test $ALL_PLATFORMS_API_TESTS_EXTRA_ARGS
|
||||
|
||||
echo *******************************
|
||||
echo *** starting notebook tests ***
|
||||
echo *******************************
|
||||
"$INTEGRATION_TEST_ELECTRON_PATH" $LINUX_EXTRA_ARGS --extensionDevelopmentPath=$ROOT/extensions/notebook --extensionTestsPath=$ROOT/extensions/notebook/out/test $ALL_PLATFORMS_API_TESTS_EXTRA_ARGS
|
||||
|
||||
echo ******************************************
|
||||
echo *** starting query-history tests ***
|
||||
echo ******************************************
|
||||
"$INTEGRATION_TEST_ELECTRON_PATH" $LINUX_EXTRA_ARGS --extensionDevelopmentPath=$ROOT/extensions/query-history --extensionTestsPath=$ROOT/extensions/query-history/out/test $ALL_PLATFORMS_API_TESTS_EXTRA_ARGS
|
||||
|
||||
echo ******************************************
|
||||
echo *** starting resource deployment tests ***
|
||||
echo ******************************************
|
||||
"$INTEGRATION_TEST_ELECTRON_PATH" $LINUX_EXTRA_ARGS --extensionDevelopmentPath=$ROOT/extensions/resource-deployment --extensionTestsPath=$ROOT/extensions/resource-deployment/out/test $ALL_PLATFORMS_API_TESTS_EXTRA_ARGS
|
||||
|
||||
echo *************************************
|
||||
echo *** starting schema compare tests ***
|
||||
echo *************************************
|
||||
"$INTEGRATION_TEST_ELECTRON_PATH" $LINUX_EXTRA_ARGS --extensionDevelopmentPath=$ROOT/extensions/schema-compare --extensionTestsPath=$ROOT/extensions/schema-compare/out/test $ALL_PLATFORMS_API_TESTS_EXTRA_ARGS
|
||||
|
||||
echo ********************************************
|
||||
echo *** starting sql-bindings tests ***
|
||||
echo ********************************************
|
||||
"$INTEGRATION_TEST_ELECTRON_PATH" $LINUX_EXTRA_ARGS --extensionDevelopmentPath=$ROOT/extensions/sql-bindings --extensionTestsPath=$ROOT/extensions/sql-bindings/out/test $ALL_PLATFORMS_API_TESTS_EXTRA_ARGS
|
||||
|
||||
|
||||
echo ********************************************
|
||||
echo *** starting sql-database-projects tests ***
|
||||
echo ********************************************
|
||||
"$INTEGRATION_TEST_ELECTRON_PATH" $LINUX_EXTRA_ARGS --extensionDevelopmentPath=$ROOT/extensions/sql-database-projects --extensionTestsPath=$ROOT/extensions/sql-database-projects/out/test $ALL_PLATFORMS_API_TESTS_EXTRA_ARGS
|
||||
|
||||
echo ********************************************
|
||||
echo *** starting data-workspace tests ***
|
||||
echo ********************************************
|
||||
"$INTEGRATION_TEST_ELECTRON_PATH" $LINUX_EXTRA_ARGS --extensionDevelopmentPath=$ROOT/extensions/data-workspace --extensionTestsPath=$ROOT/extensions/data-workspace/out/test $ALL_PLATFORMS_API_TESTS_EXTRA_ARGS
|
||||
|
||||
if [[ "$NO_CLEANUP" == "" ]]; then
|
||||
rm -r $VSCODEUSERDATADIR
|
||||
rm -r $VSCODEEXTDIR
|
||||
|
||||
Reference in New Issue
Block a user