From 54c2fe68998a0306ae2911285a40f924998d1c03 Mon Sep 17 00:00:00 2001 From: Alan Ren Date: Mon, 26 Sep 2022 17:48:59 -0700 Subject: [PATCH] remove duplicate code (#20664) * remove dupe code * fix step name * fix errors * comment out arc * fix timeout issue * fix typo * update name --- .../linux/sql-product-build-linux.yml | 12 +-- .../win32/sql-product-test-win32.yml | 24 ------ extensions/admin-tool-ext-win/package.json | 9 +- .../admin-tool-ext-win/src/test/index.ts | 41 +--------- extensions/admin-tool-ext-win/yarn.lock | 35 +++++++- extensions/agent/package.json | 5 +- extensions/agent/src/test/index.ts | 41 +--------- extensions/agent/yarn.lock | 56 ++++++++++++- extensions/arc/package.json | 4 +- extensions/arc/src/test/index.ts | 41 +--------- .../src/test/ui/components/filePicker.test.ts | 2 +- .../ui/components/radioOptionsGroup.test.ts | 2 +- extensions/arc/yarn.lock | 10 ++- extensions/azcli/package.json | 5 +- extensions/azcli/src/test/index.ts | 41 +--------- extensions/azcli/yarn.lock | 54 ++++++++++++ extensions/azurecore/package.json | 5 +- extensions/azurecore/src/test/index.ts | 41 +--------- extensions/azurecore/yarn.lock | 54 ++++++++++++ extensions/cms/package.json | 5 +- extensions/cms/src/test/index.ts | 41 +--------- extensions/cms/yarn.lock | 54 ++++++++++++ extensions/dacpac/package.json | 4 +- extensions/dacpac/src/test/index.ts | 41 +--------- extensions/dacpac/yarn.lock | 10 ++- extensions/data-workspace/package.json | 5 +- extensions/data-workspace/src/test/index.ts | 41 +--------- extensions/data-workspace/yarn.lock | 54 ++++++++++++ extensions/import/package.json | 5 +- extensions/import/src/test/index.ts | 41 +--------- extensions/import/yarn.lock | 14 +++- extensions/integration-tests/package.json | 5 +- .../integration-tests/src/test/index.ts | 42 +--------- extensions/integration-tests/yarn.lock | 82 +++++++++++++++++-- extensions/machine-learning/package.json | 5 +- extensions/machine-learning/src/test/index.ts | 41 +--------- extensions/machine-learning/yarn.lock | 54 ++++++++++++ extensions/mssql/package.json | 5 +- extensions/mssql/src/test/index.ts | 41 +--------- extensions/mssql/yarn.lock | 12 +++ extensions/notebook/package.json | 5 +- .../notebook/src/integrationTest/index.ts | 41 +--------- extensions/notebook/src/test/index.ts | 41 +--------- extensions/notebook/yarn.lock | 54 ++++++++++++ extensions/query-history/package.json | 2 +- extensions/query-history/src/test/index.ts | 41 +--------- extensions/query-history/yarn.lock | 74 +++++++++++++++-- extensions/resource-deployment/package.json | 4 +- .../resource-deployment/src/test/index.ts | 41 +--------- .../test/ui/validation/modelViewUtils.test.ts | 2 +- extensions/resource-deployment/yarn.lock | 10 ++- extensions/schema-compare/package.json | 4 +- extensions/schema-compare/src/test/index.ts | 41 +--------- extensions/schema-compare/yarn.lock | 10 ++- extensions/sql-bindings/package.json | 3 +- extensions/sql-bindings/src/test/index.ts | 41 +--------- extensions/sql-bindings/yarn.lock | 61 ++++++++++++++ extensions/sql-database-projects/package.json | 5 +- .../sql-database-projects/src/test/index.ts | 41 +--------- extensions/sql-database-projects/yarn.lock | 61 ++++++++++++++ scripts/sql-test-integration-unstable.bat | 10 --- scripts/sql-test-integration-unstable.sh | 18 ---- scripts/sql-test-integration.bat | 7 -- scripts/sql-test-integration.sh | 7 -- scripts/test-extensions-unit-unstable.bat | 12 --- scripts/test-extensions-unit-unstable.sh | 17 ---- scripts/test-extensions-unit.bat | 7 -- scripts/test-extensions-unit.js | 7 -- scripts/test-extensions-unit.sh | 7 -- 69 files changed, 802 insertions(+), 956 deletions(-) delete mode 100644 scripts/sql-test-integration-unstable.bat delete mode 100755 scripts/sql-test-integration-unstable.sh delete mode 100755 scripts/test-extensions-unit-unstable.bat delete mode 100755 scripts/test-extensions-unit-unstable.sh diff --git a/build/azure-pipelines/linux/sql-product-build-linux.yml b/build/azure-pipelines/linux/sql-product-build-linux.yml index cd44123b42..54b791dcb6 100644 --- a/build/azure-pipelines/linux/sql-product-build-linux.yml +++ b/build/azure-pipelines/linux/sql-product-build-linux.yml @@ -147,19 +147,9 @@ steps: NO_CLEANUP=1 \ VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/azuredatastudio-reh-linux-x64" \ DISPLAY=:10 ./scripts/test-extensions-unit.sh --build --tfs "Extension Unit Tests" - displayName: 'Run Stable Extension Unit Tests' + displayName: 'Run Extension Unit Tests' condition: and(succeeded(), eq(variables['RUN_TESTS'], 'true')) - - script: | - set -e - APP_ROOT=$(agent.builddirectory)/azuredatastudio-linux-x64 - APP_NAME=$(node -p "require(\"$APP_ROOT/resources/app/product.json\").applicationName") - INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME" \ - DISPLAY=:10 ./scripts/test-extensions-unit-unstable.sh - displayName: 'Run Unstable Extension Unit Tests' - continueOnError: true - condition: and(succeeded(), eq(variables['RUN_UNSTABLE_TESTS'], 'true')) - - bash: | set -e mkdir -p $(Build.ArtifactStagingDirectory)/logs/linux-x64 diff --git a/build/azure-pipelines/win32/sql-product-test-win32.yml b/build/azure-pipelines/win32/sql-product-test-win32.yml index 50b29aeea0..d5efdd4717 100644 --- a/build/azure-pipelines/win32/sql-product-test-win32.yml +++ b/build/azure-pipelines/win32/sql-product-test-win32.yml @@ -67,30 +67,6 @@ steps: STANDALONE_SQL_PWD_2019: $(ads-integration-test-standalone-server-password-2019) STANDALONE_SQL_2019: $(ads-integration-test-standalone-server-2019) -- powershell: | - . build/azure-pipelines/win32/exec.ps1 - $ErrorActionPreference = "Stop" - $AppRoot = "$(Agent.TempDirectory)\azuredatastudio-win32-x64" - $AppProductJson = Get-Content -Raw -Path "$AppRoot\resources\app\product.json" | ConvertFrom-Json - $AppNameShort = $AppProductJson.nameShort - exec { $env:INTEGRATION_TEST_ELECTRON_PATH = "$AppRoot\$AppNameShort.exe"; .\scripts\sql-test-integration-unstable.bat } - continueOnError: true - condition: and(succeeded(), and(eq(variables['RUN_UNSTABLE_TESTS'], 'true'), ne(variables['RUN_INTEGRATION_TESTS'], 'false'))) - displayName: Run unstable integration tests - env: - BDC_BACKEND_USERNAME: $(ads-integration-test-bdc-server-username) - BDC_BACKEND_PWD: $(ads-integration-test-bdc-server-password) - BDC_BACKEND_HOSTNAME: $(ads-integration-test-bdc-server) - STANDALONE_SQL_USERNAME: $(ads-integration-test-standalone-server-username) - STANDALONE_SQL_PWD: $(ads-integration-test-standalone-server-password) - STANDALONE_SQL: $(ads-integration-test-standalone-server) - AZURE_SQL_USERNAME: $(ads-integration-test-azure-server-username) - AZURE_SQL_PWD: $(ads-integration-test-azure-server-password) - AZURE_SQL: $(ads-integration-test-azure-server) - STANDALONE_SQL_USERNAME_2019: $(ads-integration-test-standalone-server-username-2019) - STANDALONE_SQL_PWD_2019: $(ads-integration-test-standalone-server-password-2019) - STANDALONE_SQL_2019: $(ads-integration-test-standalone-server-2019) - - task: PublishTestResults@2 displayName: 'Publish Integration and Smoke Test Results' inputs: diff --git a/extensions/admin-tool-ext-win/package.json b/extensions/admin-tool-ext-win/package.json index c20c215d40..8b7c4f9505 100644 --- a/extensions/admin-tool-ext-win/package.json +++ b/extensions/admin-tool-ext-win/package.json @@ -15,12 +15,12 @@ "scripts": { "postinstall": "node ./build/postinstall.js" }, - "capabilities": { + "capabilities": { "virtualWorkspaces": false, "untrustedWorkspaces": { "supported": true } - }, + }, "activationEvents": [ "onCommand:adminToolExtWin.launchSsmsMinPropertiesDialog", "onCommand:adminToolExtWin.launchSsmsMinGswDialog" @@ -115,10 +115,9 @@ "@types/mocha": "^7.0.2", "@types/node": "^12.11.7", "mocha": "^7.1.1", - "mocha-junit-reporter": "^1.17.0", - "mocha-multi-reporters": "^1.1.7", "should": "^13.2.3", - "@microsoft/vscodetestcover": "^1.2.1" + "@microsoft/vscodetestcover": "^1.2.1", + "@microsoft/azdata-test": "^2.0.3" }, "__metadata": { "id": "41", diff --git a/extensions/admin-tool-ext-win/src/test/index.ts b/extensions/admin-tool-ext-win/src/test/index.ts index 079005d3b7..ce9d5ffd6e 100644 --- a/extensions/admin-tool-ext-win/src/test/index.ts +++ b/extensions/admin-tool-ext-win/src/test/index.ts @@ -3,46 +3,9 @@ * Licensed under the Source EULA. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as path from 'path'; +import { getDefaultMochaOptions } from '@microsoft/azdata-test'; 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' }); +testRunner.configure(getDefaultMochaOptions('admin-tool-ext-win Extension Tests'), { coverConfig: '../../coverConfig.json' }); export = testRunner; diff --git a/extensions/admin-tool-ext-win/yarn.lock b/extensions/admin-tool-ext-win/yarn.lock index d99c8ce879..47cd985f33 100644 --- a/extensions/admin-tool-ext-win/yarn.lock +++ b/extensions/admin-tool-ext-win/yarn.lock @@ -234,6 +234,18 @@ resolved "https://registry.yarnpkg.com/@microsoft/applicationinsights-shims/-/applicationinsights-shims-2.0.1.tgz#5d72fb7aaf4056c4fda54f9d7c93ccf8ca9bcbfd" integrity sha512-G0MXf6R6HndRbDy9BbEj0zrLeuhwt2nsXk2zKtF0TnYo39KgYqhYC2ayIzKPTm2KAE+xzD7rgyLdZnrcRvt9WQ== +"@microsoft/azdata-test@^2.0.3": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@microsoft/azdata-test/-/azdata-test-2.0.3.tgz#652984efa2f5adc56cdae9029a4d5f33446b54d3" + integrity sha512-BgB6gGjQVXxnZHq7o5TlajZR/mJd/6AqbclrGzoyATvCEt92jRXhPzaY6XA/jMahdUGFSQwXpm45qRhZetwDig== + dependencies: + http-proxy-agent "^2.1.0" + https-proxy-agent "^2.2.4" + mocha-junit-reporter "^1.17.0" + mocha-multi-reporters "^1.1.7" + rimraf "^2.6.3" + typemoq "^2.1.0" + "@microsoft/dynamicproto-js@^1.1.6": version "1.1.6" resolved "https://registry.yarnpkg.com/@microsoft/dynamicproto-js/-/dynamicproto-js-1.1.6.tgz#6fe03468862861f5f88ac4c3959a652b3797f1bc" @@ -417,6 +429,11 @@ chownr@^2.0.0: resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece" integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ== +circular-json@^0.3.1: + version "0.3.3" + resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.3.tgz#815c99ea84f6809529d2f45791bdf82711352d66" + integrity sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A== + cliui@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" @@ -789,7 +806,7 @@ http-proxy-agent@^2.1.0: agent-base "4" debug "3.1.0" -https-proxy-agent@^2.2.3: +https-proxy-agent@^2.2.3, https-proxy-agent@^2.2.4: version "2.2.4" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz#4ee7a737abd92678a293d9b34a1af4d0d08c787b" integrity sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg== @@ -1029,7 +1046,7 @@ locate-path@^3.0.0: p-locate "^3.0.0" path-exists "^3.0.0" -lodash@^4.16.4, lodash@^4.17.13, lodash@^4.17.15: +lodash@^4.16.4, lodash@^4.17.13, lodash@^4.17.15, lodash@^4.17.4: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -1281,6 +1298,11 @@ pify@^4.0.1: resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== +postinstall-build@^5.0.1: + version "5.0.3" + resolved "https://registry.yarnpkg.com/postinstall-build/-/postinstall-build-5.0.3.tgz#238692f712a481d8f5bc8960e94786036241efc7" + integrity sha512-vPvPe8TKgp4FLgY3+DfxCE5PIfoXBK2lyLfNCxsRbDsV6vS4oU5RG/IWxrblMn6heagbnMED3MemUQllQ2bQUg== + readdirp@~3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.2.0.tgz#c30c33352b12c96dfb4b895421a49fd5a9593839" @@ -1525,6 +1547,15 @@ to-regex-range@^5.0.1: dependencies: is-number "^7.0.0" +typemoq@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/typemoq/-/typemoq-2.1.0.tgz#4452ce360d92cf2a1a180f0c29de2803f87af1e8" + integrity sha512-DtRNLb7x8yCTv/KHlwes+NI+aGb4Vl1iPC63Hhtcvk1DpxSAZzKWQv0RQFY0jX2Uqj0SDBNl8Na4e6MV6TNDgw== + dependencies: + circular-json "^0.3.1" + lodash "^4.17.4" + postinstall-build "^5.0.1" + unbox-primitive@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e" diff --git a/extensions/agent/package.json b/extensions/agent/package.json index 21d3abb457..d6c7b4f266 100644 --- a/extensions/agent/package.json +++ b/extensions/agent/package.json @@ -92,11 +92,10 @@ "@types/mocha": "^7.0.2", "@types/node": "^12.11.7", "mocha": "^7.1.1", - "mocha-junit-reporter": "^1.17.0", - "mocha-multi-reporters": "^1.1.7", "should": "^13.2.1", "typemoq": "^2.1.0", - "@microsoft/vscodetestcover": "^1.2.1" + "@microsoft/vscodetestcover": "^1.2.1", + "@microsoft/azdata-test": "^2.0.3" }, "__metadata": { "id": "10", diff --git a/extensions/agent/src/test/index.ts b/extensions/agent/src/test/index.ts index 0b381dc1b3..2647843798 100644 --- a/extensions/agent/src/test/index.ts +++ b/extensions/agent/src/test/index.ts @@ -3,46 +3,9 @@ * Licensed under the Source EULA. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as path from 'path'; +import { getDefaultMochaOptions } from '@microsoft/azdata-test'; import * as testRunner from '@microsoft/vscodetestcover'; -const suite = 'agent 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' }); +testRunner.configure(getDefaultMochaOptions('Agent Extension Tests'), { coverConfig: '../../coverConfig.json' }); export = testRunner; diff --git a/extensions/agent/yarn.lock b/extensions/agent/yarn.lock index fe7d07ede7..3831ad0398 100644 --- a/extensions/agent/yarn.lock +++ b/extensions/agent/yarn.lock @@ -182,6 +182,18 @@ resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.2.tgz#26520bf09abe4a5644cd5414e37125a8954241dd" integrity sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw== +"@microsoft/azdata-test@^2.0.3": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@microsoft/azdata-test/-/azdata-test-2.0.3.tgz#652984efa2f5adc56cdae9029a4d5f33446b54d3" + integrity sha512-BgB6gGjQVXxnZHq7o5TlajZR/mJd/6AqbclrGzoyATvCEt92jRXhPzaY6XA/jMahdUGFSQwXpm45qRhZetwDig== + dependencies: + http-proxy-agent "^2.1.0" + https-proxy-agent "^2.2.4" + mocha-junit-reporter "^1.17.0" + mocha-multi-reporters "^1.1.7" + rimraf "^2.6.3" + typemoq "^2.1.0" + "@microsoft/vscodetestcover@^1.2.1": version "1.2.1" resolved "https://registry.yarnpkg.com/@microsoft/vscodetestcover/-/vscodetestcover-1.2.1.tgz#65f25132075a465a7a99688204486ee2b65ac07b" @@ -207,6 +219,13 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.7.tgz#01e4ea724d9e3bd50d90c11fd5980ba317d8fa11" integrity sha512-E6Zn0rffhgd130zbCbAr/JdXfXkoOUFAKNs/rF8qnafSJ8KYaA/j3oz7dcwal+lYjLA7xvdd5J4wdYpCTlP8+w== +agent-base@4, agent-base@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee" + integrity sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg== + dependencies: + es6-promisify "^5.0.0" + ansi-colors@3.2.3: version "3.2.3" resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.3.tgz#57d35b8686e851e2cc04c403f1c00203976a1813" @@ -371,6 +390,13 @@ crypt@~0.0.1: resolved "https://registry.yarnpkg.com/crypt/-/crypt-0.0.2.tgz#88d7ff7ec0dfb86f713dc87bbb42d044d3e6c41b" integrity sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs= +debug@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" + integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== + dependencies: + ms "2.0.0" + debug@3.2.6, debug@^3.1.0: version "3.2.6" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" @@ -467,6 +493,18 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" +es6-promise@^4.0.3: + version "4.2.8" + resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a" + integrity sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w== + +es6-promisify@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203" + integrity sha512-C+d6UdsYDk0lMebHNR4S2NybQMMngAOnOwYBQjTOiv0MkoJMP0Myw2mgpDLBcpfCmRLxyFqYhS/CfOENq4SJhQ== + dependencies: + es6-promise "^4.0.3" + escape-string-regexp@1.0.5, escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" @@ -659,6 +697,22 @@ html-escaper@^2.0.0: resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== +http-proxy-agent@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz#e4821beef5b2142a2026bd73926fe537631c5405" + integrity sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg== + dependencies: + agent-base "4" + debug "3.1.0" + +https-proxy-agent@^2.2.4: + version "2.2.4" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz#4ee7a737abd92678a293d9b34a1af4d0d08c787b" + integrity sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg== + dependencies: + agent-base "^4.3.0" + debug "^3.1.0" + inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" @@ -939,7 +993,7 @@ minimist@^1.2.5: resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== -mkdirp@~0.5.1, mkdirp@0.5.5: +mkdirp@0.5.5, mkdirp@~0.5.1: version "0.5.5" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== diff --git a/extensions/arc/package.json b/extensions/arc/package.json index 071e9445f2..2106476465 100644 --- a/extensions/arc/package.json +++ b/extensions/arc/package.json @@ -1599,10 +1599,8 @@ "@types/sinon": "^9.0.4", "@types/uuid": "^8.3.0", "@types/yamljs": "^0.2.31", - "@microsoft/azdata-test": "^1.5.1", + "@microsoft/azdata-test": "^2.0.3", "mocha": "^7.1.1", - "mocha-junit-reporter": "^1.17.0", - "mocha-multi-reporters": "^1.1.7", "should": "^13.2.3", "sinon": "^9.0.2", "typemoq": "2.1.0", diff --git a/extensions/arc/src/test/index.ts b/extensions/arc/src/test/index.ts index fd161b0f63..3fc0da0c4f 100644 --- a/extensions/arc/src/test/index.ts +++ b/extensions/arc/src/test/index.ts @@ -3,46 +3,9 @@ * Licensed under the Source EULA. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as path from 'path'; +import { getDefaultMochaOptions } from '@microsoft/azdata-test'; import * as testRunner from '@microsoft/vscodetestcover'; -const suite = 'arc 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' }); +testRunner.configure(getDefaultMochaOptions('arc Extension Tests'), { coverConfig: '../../coverConfig.json' }); export = testRunner; diff --git a/extensions/arc/src/test/ui/components/filePicker.test.ts b/extensions/arc/src/test/ui/components/filePicker.test.ts index 8193eb8195..3eb29d83bc 100644 --- a/extensions/arc/src/test/ui/components/filePicker.test.ts +++ b/extensions/arc/src/test/ui/components/filePicker.test.ts @@ -9,7 +9,7 @@ import * as sinon from 'sinon'; import * as vscode from 'vscode'; import { Deferred } from '../../../common/promise'; import { FilePicker } from '../../../ui/components/filePicker'; -import { createModelViewMock } from '@microsoft/azdata-test/out/mocks/modelView/modelViewMock'; +import { createModelViewMock } from '@microsoft/azdata-test/out/mocks/azdata/modelView'; import { StubButton } from '@microsoft/azdata-test/out/stubs/modelView/stubButton'; let filePicker: FilePicker; diff --git a/extensions/arc/src/test/ui/components/radioOptionsGroup.test.ts b/extensions/arc/src/test/ui/components/radioOptionsGroup.test.ts index 196b4a8129..72b8ad5280 100644 --- a/extensions/arc/src/test/ui/components/radioOptionsGroup.test.ts +++ b/extensions/arc/src/test/ui/components/radioOptionsGroup.test.ts @@ -6,7 +6,7 @@ import * as azdata from 'azdata'; import * as should from 'should'; import { RadioOptionsGroup, RadioOptionsInfo } from '../../../ui/components/radioOptionsGroup'; -import { createModelViewMock } from '@microsoft/azdata-test/out/mocks/modelView/modelViewMock'; +import { createModelViewMock } from '@microsoft/azdata-test/out/mocks/azdata/modelView'; import { StubRadioButton } from '@microsoft/azdata-test/out/stubs/modelView/stubRadioButton'; import * as loc from '../../../localizedConstants'; diff --git a/extensions/arc/yarn.lock b/extensions/arc/yarn.lock index 180b7ea938..7f199fbbca 100644 --- a/extensions/arc/yarn.lock +++ b/extensions/arc/yarn.lock @@ -182,13 +182,15 @@ resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.2.tgz#26520bf09abe4a5644cd5414e37125a8954241dd" integrity sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw== -"@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@^2.0.3": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@microsoft/azdata-test/-/azdata-test-2.0.3.tgz#652984efa2f5adc56cdae9029a4d5f33446b54d3" + integrity sha512-BgB6gGjQVXxnZHq7o5TlajZR/mJd/6AqbclrGzoyATvCEt92jRXhPzaY6XA/jMahdUGFSQwXpm45qRhZetwDig== dependencies: http-proxy-agent "^2.1.0" https-proxy-agent "^2.2.4" + mocha-junit-reporter "^1.17.0" + mocha-multi-reporters "^1.1.7" rimraf "^2.6.3" typemoq "^2.1.0" diff --git a/extensions/azcli/package.json b/extensions/azcli/package.json index 1b89e033af..ec9e6098f4 100644 --- a/extensions/azcli/package.json +++ b/extensions/azcli/package.json @@ -102,13 +102,12 @@ "@types/uuid": "^8.0.0", "@types/which": "^1.3.2", "mocha": "^7.1.1", - "mocha-junit-reporter": "^1.17.0", - "mocha-multi-reporters": "^1.1.7", "nock": "^13.0.2", "should": "^13.2.3", "sinon": "^9.0.2", "typemoq": "^2.1.0", - "@microsoft/vscodetestcover": "^1.2.1" + "@microsoft/vscodetestcover": "^1.2.1", + "@microsoft/azdata-test": "^2.0.3" }, "__metadata": { "id": "84", diff --git a/extensions/azcli/src/test/index.ts b/extensions/azcli/src/test/index.ts index c7d80dca96..76379a1b82 100644 --- a/extensions/azcli/src/test/index.ts +++ b/extensions/azcli/src/test/index.ts @@ -3,46 +3,9 @@ * Licensed under the Source EULA. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as path from 'path'; +import { getDefaultMochaOptions } from '@microsoft/azdata-test'; import * as testRunner from '@microsoft/vscodetestcover'; -const suite = 'azcli 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' }); +testRunner.configure(getDefaultMochaOptions('azcli Extension Tests'), { coverConfig: '../../coverConfig.json' }); export = testRunner; diff --git a/extensions/azcli/yarn.lock b/extensions/azcli/yarn.lock index d2ae3f7e07..a134ce55bb 100644 --- a/extensions/azcli/yarn.lock +++ b/extensions/azcli/yarn.lock @@ -181,6 +181,18 @@ resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.2.tgz#26520bf09abe4a5644cd5414e37125a8954241dd" integrity sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw== +"@microsoft/azdata-test@^2.0.3": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@microsoft/azdata-test/-/azdata-test-2.0.3.tgz#652984efa2f5adc56cdae9029a4d5f33446b54d3" + integrity sha512-BgB6gGjQVXxnZHq7o5TlajZR/mJd/6AqbclrGzoyATvCEt92jRXhPzaY6XA/jMahdUGFSQwXpm45qRhZetwDig== + dependencies: + http-proxy-agent "^2.1.0" + https-proxy-agent "^2.2.4" + mocha-junit-reporter "^1.17.0" + mocha-multi-reporters "^1.1.7" + rimraf "^2.6.3" + typemoq "^2.1.0" + "@microsoft/vscodetestcover@^1.2.1": version "1.2.1" resolved "https://registry.yarnpkg.com/@microsoft/vscodetestcover/-/vscodetestcover-1.2.1.tgz#65f25132075a465a7a99688204486ee2b65ac07b" @@ -296,6 +308,13 @@ resolved "https://registry.yarnpkg.com/@types/which/-/which-1.3.2.tgz#9c246fc0c93ded311c8512df2891fb41f6227fdf" integrity sha512-8oDqyLC7eD4HM307boe2QWKyuzdzWBj56xI/imSl2cpL+U3tCMaTAkMJ4ee5JBZ/FsOJlvRGeIShiZDAl1qERA== +agent-base@4, agent-base@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee" + integrity sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg== + dependencies: + es6-promisify "^5.0.0" + ajv@^6.5.5: version "6.12.3" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.3.tgz#18c5af38a111ddeb4f2697bd78d68abc1cabd706" @@ -528,6 +547,13 @@ dashdash@^1.12.0: dependencies: assert-plus "^1.0.0" +debug@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" + integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== + dependencies: + ms "2.0.0" + debug@3.2.6, debug@^3.1.0: version "3.2.6" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" @@ -642,6 +668,18 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" +es6-promise@^4.0.3: + version "4.2.8" + resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a" + integrity sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w== + +es6-promisify@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203" + integrity sha512-C+d6UdsYDk0lMebHNR4S2NybQMMngAOnOwYBQjTOiv0MkoJMP0Myw2mgpDLBcpfCmRLxyFqYhS/CfOENq4SJhQ== + dependencies: + es6-promise "^4.0.3" + escape-string-regexp@1.0.5, escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" @@ -890,6 +928,14 @@ html-escaper@^2.0.0: resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== +http-proxy-agent@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz#e4821beef5b2142a2026bd73926fe537631c5405" + integrity sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg== + dependencies: + agent-base "4" + debug "3.1.0" + http-signature@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" @@ -899,6 +945,14 @@ http-signature@~1.2.0: jsprim "^1.2.2" sshpk "^1.7.0" +https-proxy-agent@^2.2.4: + version "2.2.4" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz#4ee7a737abd92678a293d9b34a1af4d0d08c787b" + integrity sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg== + dependencies: + agent-base "^4.3.0" + debug "^3.1.0" + inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" diff --git a/extensions/azurecore/package.json b/extensions/azurecore/package.json index 6dbceba7d8..10c693c013 100644 --- a/extensions/azurecore/package.json +++ b/extensions/azurecore/package.json @@ -363,11 +363,10 @@ "@types/sinon": "^9.0.4", "@types/ws": "^6.0.4", "mocha": "^7.1.1", - "mocha-junit-reporter": "^1.17.0", - "mocha-multi-reporters": "^1.1.7", "should": "^13.2.1", "sinon": "^9.0.2", "typemoq": "^2.1.0", - "@microsoft/vscodetestcover": "^1.2.1" + "@microsoft/vscodetestcover": "^1.2.1", + "@microsoft/azdata-test": "^2.0.3" } } diff --git a/extensions/azurecore/src/test/index.ts b/extensions/azurecore/src/test/index.ts index 9e1220a774..4abcfb2df9 100644 --- a/extensions/azurecore/src/test/index.ts +++ b/extensions/azurecore/src/test/index.ts @@ -3,46 +3,9 @@ * Licensed under the Source EULA. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as path from 'path'; +import { getDefaultMochaOptions } from '@microsoft/azdata-test'; import * as testRunner from '@microsoft/vscodetestcover'; -const suite = 'azurecore 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' }); +testRunner.configure(getDefaultMochaOptions('azurecore Extension Tests'), { coverConfig: '../../coverConfig.json' }); export = testRunner; diff --git a/extensions/azurecore/yarn.lock b/extensions/azurecore/yarn.lock index 435ab529b0..bd59a88da1 100644 --- a/extensions/azurecore/yarn.lock +++ b/extensions/azurecore/yarn.lock @@ -321,6 +321,18 @@ resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.2.tgz#26520bf09abe4a5644cd5414e37125a8954241dd" integrity sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw== +"@microsoft/azdata-test@^2.0.3": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@microsoft/azdata-test/-/azdata-test-2.0.3.tgz#652984efa2f5adc56cdae9029a4d5f33446b54d3" + integrity sha512-BgB6gGjQVXxnZHq7o5TlajZR/mJd/6AqbclrGzoyATvCEt92jRXhPzaY6XA/jMahdUGFSQwXpm45qRhZetwDig== + dependencies: + http-proxy-agent "^2.1.0" + https-proxy-agent "^2.2.4" + mocha-junit-reporter "^1.17.0" + mocha-multi-reporters "^1.1.7" + rimraf "^2.6.3" + typemoq "^2.1.0" + "@microsoft/vscodetestcover@^1.2.1": version "1.2.1" resolved "https://registry.yarnpkg.com/@microsoft/vscodetestcover/-/vscodetestcover-1.2.1.tgz#65f25132075a465a7a99688204486ee2b65ac07b" @@ -468,6 +480,13 @@ abort-controller@^3.0.0: dependencies: event-target-shim "^5.0.0" +agent-base@4, agent-base@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee" + integrity sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg== + dependencies: + es6-promisify "^5.0.0" + ansi-colors@3.2.3: version "3.2.3" resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.3.tgz#57d35b8686e851e2cc04c403f1c00203976a1813" @@ -652,6 +671,13 @@ crypt@~0.0.1: resolved "https://registry.yarnpkg.com/crypt/-/crypt-0.0.2.tgz#88d7ff7ec0dfb86f713dc87bbb42d044d3e6c41b" integrity sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs= +debug@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" + integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== + dependencies: + ms "2.0.0" + debug@3.2.6, debug@^3.1.0: version "3.2.6" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" @@ -758,6 +784,18 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" +es6-promise@^4.0.3: + version "4.2.8" + resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a" + integrity sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w== + +es6-promisify@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203" + integrity sha512-C+d6UdsYDk0lMebHNR4S2NybQMMngAOnOwYBQjTOiv0MkoJMP0Myw2mgpDLBcpfCmRLxyFqYhS/CfOENq4SJhQ== + dependencies: + es6-promise "^4.0.3" + escape-string-regexp@1.0.5, escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" @@ -980,6 +1018,22 @@ html-escaper@^2.0.0: resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== +http-proxy-agent@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz#e4821beef5b2142a2026bd73926fe537631c5405" + integrity sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg== + dependencies: + agent-base "4" + debug "3.1.0" + +https-proxy-agent@^2.2.4: + version "2.2.4" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz#4ee7a737abd92678a293d9b34a1af4d0d08c787b" + integrity sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg== + dependencies: + agent-base "^4.3.0" + debug "^3.1.0" + inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" diff --git a/extensions/cms/package.json b/extensions/cms/package.json index bb45d8b5a8..4a2fd6d064 100644 --- a/extensions/cms/package.json +++ b/extensions/cms/package.json @@ -659,12 +659,11 @@ "devDependencies": { "@types/mocha": "^7.0.2", "@types/node": "^12.11.7", - "mocha-junit-reporter": "^1.17.0", - "mocha-multi-reporters": "^1.1.7", "mocha": "^7.1.1", "should": "^13.2.1", "@microsoft/vscodetestcover": "^1.2.1", - "typemoq": "^2.1.0" + "typemoq": "^2.1.0", + "@microsoft/azdata-test": "^2.0.3" }, "__metadata": { "id": "40", diff --git a/extensions/cms/src/test/index.ts b/extensions/cms/src/test/index.ts index f5ddcc9ce0..33ec2f237a 100644 --- a/extensions/cms/src/test/index.ts +++ b/extensions/cms/src/test/index.ts @@ -3,46 +3,9 @@ * Licensed under the Source EULA. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as path from 'path'; +import { getDefaultMochaOptions } from '@microsoft/azdata-test'; import * as testRunner from '@microsoft/vscodetestcover'; -const suite = 'cms 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' }); +testRunner.configure(getDefaultMochaOptions('CMS Extension Tests'), { coverConfig: '../../coverConfig.json' }); export = testRunner; diff --git a/extensions/cms/yarn.lock b/extensions/cms/yarn.lock index 56ee368cc2..0446b83ac1 100644 --- a/extensions/cms/yarn.lock +++ b/extensions/cms/yarn.lock @@ -182,6 +182,18 @@ resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.2.tgz#26520bf09abe4a5644cd5414e37125a8954241dd" integrity sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw== +"@microsoft/azdata-test@^2.0.3": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@microsoft/azdata-test/-/azdata-test-2.0.3.tgz#652984efa2f5adc56cdae9029a4d5f33446b54d3" + integrity sha512-BgB6gGjQVXxnZHq7o5TlajZR/mJd/6AqbclrGzoyATvCEt92jRXhPzaY6XA/jMahdUGFSQwXpm45qRhZetwDig== + dependencies: + http-proxy-agent "^2.1.0" + https-proxy-agent "^2.2.4" + mocha-junit-reporter "^1.17.0" + mocha-multi-reporters "^1.1.7" + rimraf "^2.6.3" + typemoq "^2.1.0" + "@microsoft/vscodetestcover@^1.2.1": version "1.2.1" resolved "https://registry.yarnpkg.com/@microsoft/vscodetestcover/-/vscodetestcover-1.2.1.tgz#65f25132075a465a7a99688204486ee2b65ac07b" @@ -207,6 +219,13 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.7.tgz#01e4ea724d9e3bd50d90c11fd5980ba317d8fa11" integrity sha512-E6Zn0rffhgd130zbCbAr/JdXfXkoOUFAKNs/rF8qnafSJ8KYaA/j3oz7dcwal+lYjLA7xvdd5J4wdYpCTlP8+w== +agent-base@4, agent-base@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee" + integrity sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg== + dependencies: + es6-promisify "^5.0.0" + ansi-colors@3.2.3: version "3.2.3" resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.3.tgz#57d35b8686e851e2cc04c403f1c00203976a1813" @@ -371,6 +390,13 @@ crypt@~0.0.1: resolved "https://registry.yarnpkg.com/crypt/-/crypt-0.0.2.tgz#88d7ff7ec0dfb86f713dc87bbb42d044d3e6c41b" integrity sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs= +debug@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" + integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== + dependencies: + ms "2.0.0" + debug@3.2.6, debug@^3.1.0: version "3.2.6" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" @@ -467,6 +493,18 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" +es6-promise@^4.0.3: + version "4.2.8" + resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a" + integrity sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w== + +es6-promisify@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203" + integrity sha512-C+d6UdsYDk0lMebHNR4S2NybQMMngAOnOwYBQjTOiv0MkoJMP0Myw2mgpDLBcpfCmRLxyFqYhS/CfOENq4SJhQ== + dependencies: + es6-promise "^4.0.3" + escape-string-regexp@1.0.5, escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" @@ -647,6 +685,22 @@ html-escaper@^2.0.0: resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== +http-proxy-agent@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz#e4821beef5b2142a2026bd73926fe537631c5405" + integrity sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg== + dependencies: + agent-base "4" + debug "3.1.0" + +https-proxy-agent@^2.2.4: + version "2.2.4" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz#4ee7a737abd92678a293d9b34a1af4d0d08c787b" + integrity sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg== + dependencies: + agent-base "^4.3.0" + debug "^3.1.0" + inflight@^1.0.4: version "1.0.6" resolved "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" diff --git a/extensions/dacpac/package.json b/extensions/dacpac/package.json index 64675b197b..d845f29006 100644 --- a/extensions/dacpac/package.json +++ b/extensions/dacpac/package.json @@ -97,14 +97,12 @@ "vscode-nls": "^4.0.0" }, "devDependencies": { - "@microsoft/azdata-test": "^1.5.2", + "@microsoft/azdata-test": "^2.0.3", "@microsoft/vscodetestcover": "^1.2.1", "@types/mocha": "^7.0.2", "@types/node": "^12.11.7", "@types/sinon": "^9.0.4", "mocha": "^7.1.1", - "mocha-junit-reporter": "^1.17.0", - "mocha-multi-reporters": "^1.1.7", "should": "^13.2.3", "sinon": "^9.0.2", "typemoq": "^2.1.0" diff --git a/extensions/dacpac/src/test/index.ts b/extensions/dacpac/src/test/index.ts index 2f3f8b994e..247735e116 100644 --- a/extensions/dacpac/src/test/index.ts +++ b/extensions/dacpac/src/test/index.ts @@ -3,46 +3,9 @@ * Licensed under the Source EULA. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as path from 'path'; +import { getDefaultMochaOptions } from '@microsoft/azdata-test'; import * as testRunner from '@microsoft/vscodetestcover'; -const suite = 'dacpac 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' }); +testRunner.configure(getDefaultMochaOptions('dacpac Extension Tests'), { coverConfig: '../../coverConfig.json' }); export = testRunner; diff --git a/extensions/dacpac/yarn.lock b/extensions/dacpac/yarn.lock index 079e3c64f6..2dadd2825c 100644 --- a/extensions/dacpac/yarn.lock +++ b/extensions/dacpac/yarn.lock @@ -220,13 +220,15 @@ resolved "https://registry.yarnpkg.com/@microsoft/applicationinsights-shims/-/applicationinsights-shims-2.0.1.tgz#5d72fb7aaf4056c4fda54f9d7c93ccf8ca9bcbfd" integrity sha512-G0MXf6R6HndRbDy9BbEj0zrLeuhwt2nsXk2zKtF0TnYo39KgYqhYC2ayIzKPTm2KAE+xzD7rgyLdZnrcRvt9WQ== -"@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== +"@microsoft/azdata-test@^2.0.3": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@microsoft/azdata-test/-/azdata-test-2.0.3.tgz#652984efa2f5adc56cdae9029a4d5f33446b54d3" + integrity sha512-BgB6gGjQVXxnZHq7o5TlajZR/mJd/6AqbclrGzoyATvCEt92jRXhPzaY6XA/jMahdUGFSQwXpm45qRhZetwDig== dependencies: http-proxy-agent "^2.1.0" https-proxy-agent "^2.2.4" + mocha-junit-reporter "^1.17.0" + mocha-multi-reporters "^1.1.7" rimraf "^2.6.3" typemoq "^2.1.0" diff --git a/extensions/data-workspace/package.json b/extensions/data-workspace/package.json index 81672ae02b..38a43be76c 100644 --- a/extensions/data-workspace/package.json +++ b/extensions/data-workspace/package.json @@ -185,11 +185,10 @@ "@types/mocha": "^7.0.2", "@types/sinon": "^9.0.4", "mocha": "^7.1.1", - "mocha-junit-reporter": "^1.17.0", - "mocha-multi-reporters": "^1.1.7", "should": "^13.2.3", "sinon": "^9.0.2", "typemoq": "^2.1.0", - "@microsoft/vscodetestcover": "^1.2.1" + "@microsoft/vscodetestcover": "^1.2.1", + "@microsoft/azdata-test": "^2.0.3" } } diff --git a/extensions/data-workspace/src/test/index.ts b/extensions/data-workspace/src/test/index.ts index 6a671fcd6e..9c42c11054 100644 --- a/extensions/data-workspace/src/test/index.ts +++ b/extensions/data-workspace/src/test/index.ts @@ -3,46 +3,11 @@ * Licensed under the Source EULA. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as path from 'path'; +import { getDefaultMochaOptions } from '@microsoft/azdata-test'; import * as testRunner from '@microsoft/vscodetestcover'; -const suite = 'Data Workspace Extension Tests'; +const options = getDefaultMochaOptions('Data Workspace Extension Tests', 'tdd'); -const mochaOptions: any = { - ui: 'tdd', - 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' }); +testRunner.configure(options, { coverConfig: '../../coverConfig.json' }); export = testRunner; diff --git a/extensions/data-workspace/yarn.lock b/extensions/data-workspace/yarn.lock index 22061c53a4..1fb1da14df 100644 --- a/extensions/data-workspace/yarn.lock +++ b/extensions/data-workspace/yarn.lock @@ -220,6 +220,18 @@ resolved "https://registry.yarnpkg.com/@microsoft/applicationinsights-shims/-/applicationinsights-shims-2.0.1.tgz#5d72fb7aaf4056c4fda54f9d7c93ccf8ca9bcbfd" integrity sha512-G0MXf6R6HndRbDy9BbEj0zrLeuhwt2nsXk2zKtF0TnYo39KgYqhYC2ayIzKPTm2KAE+xzD7rgyLdZnrcRvt9WQ== +"@microsoft/azdata-test@^2.0.3": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@microsoft/azdata-test/-/azdata-test-2.0.3.tgz#652984efa2f5adc56cdae9029a4d5f33446b54d3" + integrity sha512-BgB6gGjQVXxnZHq7o5TlajZR/mJd/6AqbclrGzoyATvCEt92jRXhPzaY6XA/jMahdUGFSQwXpm45qRhZetwDig== + dependencies: + http-proxy-agent "^2.1.0" + https-proxy-agent "^2.2.4" + mocha-junit-reporter "^1.17.0" + mocha-multi-reporters "^1.1.7" + rimraf "^2.6.3" + typemoq "^2.1.0" + "@microsoft/dynamicproto-js@^1.1.6": version "1.1.6" resolved "https://registry.yarnpkg.com/@microsoft/dynamicproto-js/-/dynamicproto-js-1.1.6.tgz#6fe03468862861f5f88ac4c3959a652b3797f1bc" @@ -322,6 +334,13 @@ "@microsoft/1ds-core-js" "^3.2.3" "@microsoft/1ds-post-js" "^3.2.3" +agent-base@4, agent-base@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee" + integrity sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg== + dependencies: + es6-promisify "^5.0.0" + ansi-colors@3.2.3: version "3.2.3" resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.3.tgz#57d35b8686e851e2cc04c403f1c00203976a1813" @@ -486,6 +505,13 @@ crypt@~0.0.1: resolved "https://registry.yarnpkg.com/crypt/-/crypt-0.0.2.tgz#88d7ff7ec0dfb86f713dc87bbb42d044d3e6c41b" integrity sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs= +debug@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" + integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== + dependencies: + ms "2.0.0" + debug@3.2.6, debug@^3.1.0: version "3.2.6" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" @@ -587,6 +613,18 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" +es6-promise@^4.0.3: + version "4.2.8" + resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a" + integrity sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w== + +es6-promisify@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203" + integrity sha512-C+d6UdsYDk0lMebHNR4S2NybQMMngAOnOwYBQjTOiv0MkoJMP0Myw2mgpDLBcpfCmRLxyFqYhS/CfOENq4SJhQ== + dependencies: + es6-promise "^4.0.3" + escape-string-regexp@1.0.5, escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" @@ -797,6 +835,22 @@ html-escaper@^2.0.0: resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== +http-proxy-agent@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz#e4821beef5b2142a2026bd73926fe537631c5405" + integrity sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg== + dependencies: + agent-base "4" + debug "3.1.0" + +https-proxy-agent@^2.2.4: + version "2.2.4" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz#4ee7a737abd92678a293d9b34a1af4d0d08c787b" + integrity sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg== + dependencies: + agent-base "^4.3.0" + debug "^3.1.0" + inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" diff --git a/extensions/import/package.json b/extensions/import/package.json index ef6c923e30..72bafdb233 100644 --- a/extensions/import/package.json +++ b/extensions/import/package.json @@ -88,12 +88,11 @@ "@types/node": "^12.11.7", "@types/sinon": "^9.0.4", "mocha": "^7.1.1", - "mocha-junit-reporter": "^1.17.0", - "mocha-multi-reporters": "^1.1.7", "should": "^13.2.1", "sinon": "^9.0.2", "typemoq": "^2.1.0", - "@microsoft/vscodetestcover": "^1.2.1" + "@microsoft/vscodetestcover": "^1.2.1", + "@microsoft/azdata-test": "^2.0.3" }, "__metadata": { "id": "23", diff --git a/extensions/import/src/test/index.ts b/extensions/import/src/test/index.ts index b5b5240eaa..de706a547b 100644 --- a/extensions/import/src/test/index.ts +++ b/extensions/import/src/test/index.ts @@ -3,46 +3,9 @@ * Licensed under the Source EULA. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as path from 'path'; +import { getDefaultMochaOptions } from '@microsoft/azdata-test'; import * as testRunner from '@microsoft/vscodetestcover'; -const suite = 'import 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' }); +testRunner.configure(getDefaultMochaOptions('import Extension Tests'), { coverConfig: '../../coverConfig.json' }); export = testRunner; diff --git a/extensions/import/yarn.lock b/extensions/import/yarn.lock index 01ba9d2c07..d8ddd9489a 100644 --- a/extensions/import/yarn.lock +++ b/extensions/import/yarn.lock @@ -196,6 +196,18 @@ tmp "^0.0.33" yauzl "^2.10.0" +"@microsoft/azdata-test@^2.0.3": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@microsoft/azdata-test/-/azdata-test-2.0.3.tgz#652984efa2f5adc56cdae9029a4d5f33446b54d3" + integrity sha512-BgB6gGjQVXxnZHq7o5TlajZR/mJd/6AqbclrGzoyATvCEt92jRXhPzaY6XA/jMahdUGFSQwXpm45qRhZetwDig== + dependencies: + http-proxy-agent "^2.1.0" + https-proxy-agent "^2.2.4" + mocha-junit-reporter "^1.17.0" + mocha-multi-reporters "^1.1.7" + rimraf "^2.6.3" + typemoq "^2.1.0" + "@microsoft/vscodetestcover@^1.2.1": version "1.2.1" resolved "https://registry.yarnpkg.com/@microsoft/vscodetestcover/-/vscodetestcover-1.2.1.tgz#65f25132075a465a7a99688204486ee2b65ac07b" @@ -842,7 +854,7 @@ http-proxy-agent@^2.1.0: agent-base "4" debug "3.1.0" -https-proxy-agent@^2.2.3: +https-proxy-agent@^2.2.3, https-proxy-agent@^2.2.4: version "2.2.4" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz#4ee7a737abd92678a293d9b34a1af4d0d08c787b" integrity sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg== diff --git a/extensions/integration-tests/package.json b/extensions/integration-tests/package.json index 3208ba0ff5..0ed9978784 100644 --- a/extensions/integration-tests/package.json +++ b/extensions/integration-tests/package.json @@ -41,8 +41,7 @@ "@azure/identity": "^2.0.4", "chai": "3.5.0", "mocha": "^7.1.1", - "mocha-junit-reporter": "^1.17.0", - "mocha-multi-reporters": "^1.1.7", - "@microsoft/vscodetestcover": "^1.2.1" + "@microsoft/vscodetestcover": "^1.2.1", + "@microsoft/azdata-test": "^2.0.3" } } diff --git a/extensions/integration-tests/src/test/index.ts b/extensions/integration-tests/src/test/index.ts index f617bd73b6..4bc8341c9e 100644 --- a/extensions/integration-tests/src/test/index.ts +++ b/extensions/integration-tests/src/test/index.ts @@ -3,46 +3,10 @@ * Licensed under the Source EULA. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as path from 'path'; +import { getDefaultMochaOptions } from '@microsoft/azdata-test'; import * as testRunner from '@microsoft/vscodetestcover'; -const suite = 'Extension Integration Tests'; - -const mochaOptions: any = { - ui: 'tdd', - useColors: true, - timeout: 60000 -}; - -// 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' }); +const options = getDefaultMochaOptions('Extension Integration Tests', 'tdd'); +testRunner.configure(options, { coverConfig: '../../coverConfig.json' }); export = testRunner; diff --git a/extensions/integration-tests/yarn.lock b/extensions/integration-tests/yarn.lock index 29dcbc004f..682e155f50 100644 --- a/extensions/integration-tests/yarn.lock +++ b/extensions/integration-tests/yarn.lock @@ -363,6 +363,18 @@ resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.2.tgz#26520bf09abe4a5644cd5414e37125a8954241dd" integrity sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw== +"@microsoft/azdata-test@^2.0.3": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@microsoft/azdata-test/-/azdata-test-2.0.3.tgz#652984efa2f5adc56cdae9029a4d5f33446b54d3" + integrity sha512-BgB6gGjQVXxnZHq7o5TlajZR/mJd/6AqbclrGzoyATvCEt92jRXhPzaY6XA/jMahdUGFSQwXpm45qRhZetwDig== + dependencies: + http-proxy-agent "^2.1.0" + https-proxy-agent "^2.2.4" + mocha-junit-reporter "^1.17.0" + mocha-multi-reporters "^1.1.7" + rimraf "^2.6.3" + typemoq "^2.1.0" + "@microsoft/vscodetestcover@^1.2.1": version "1.2.1" resolved "https://registry.yarnpkg.com/@microsoft/vscodetestcover/-/vscodetestcover-1.2.1.tgz#65f25132075a465a7a99688204486ee2b65ac07b" @@ -423,6 +435,13 @@ dependencies: "@types/node" "*" +agent-base@4, agent-base@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee" + integrity sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg== + dependencies: + es6-promisify "^5.0.0" + agent-base@6: version "6.0.2" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" @@ -582,6 +601,11 @@ chokidar@3.3.0: optionalDependencies: fsevents "~2.1.1" +circular-json@^0.3.1: + version "0.3.3" + resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.3.tgz#815c99ea84f6809529d2f45791bdf82711352d66" + integrity sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A== + cliui@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" @@ -627,6 +651,13 @@ crypt@~0.0.1: resolved "https://registry.yarnpkg.com/crypt/-/crypt-0.0.2.tgz#88d7ff7ec0dfb86f713dc87bbb42d044d3e6c41b" integrity sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs= +debug@3.1.0, debug@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" + integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== + dependencies: + ms "2.0.0" + debug@3.2.6: version "3.2.6" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" @@ -648,13 +679,6 @@ debug@^2.2.0: dependencies: ms "2.0.0" -debug@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" - integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== - dependencies: - ms "2.0.0" - debug@^4.1.0, debug@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" @@ -761,6 +785,18 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" +es6-promise@^4.0.3: + version "4.2.8" + resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a" + integrity sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w== + +es6-promisify@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203" + integrity sha512-C+d6UdsYDk0lMebHNR4S2NybQMMngAOnOwYBQjTOiv0MkoJMP0Myw2mgpDLBcpfCmRLxyFqYhS/CfOENq4SJhQ== + dependencies: + es6-promise "^4.0.3" + escape-string-regexp@1.0.5, escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" @@ -981,6 +1017,14 @@ html-escaper@^2.0.0: resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== +http-proxy-agent@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz#e4821beef5b2142a2026bd73926fe537631c5405" + integrity sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg== + dependencies: + agent-base "4" + debug "3.1.0" + http-proxy-agent@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz#8a8c8ef7f5932ccf953c296ca8291b95aa74aa3a" @@ -990,6 +1034,14 @@ http-proxy-agent@^4.0.1: agent-base "6" debug "4" +https-proxy-agent@^2.2.4: + version "2.2.4" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz#4ee7a737abd92678a293d9b34a1af4d0d08c787b" + integrity sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg== + dependencies: + agent-base "^4.3.0" + debug "^3.1.0" + https-proxy-agent@^5.0.0: version "5.0.1" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" @@ -1324,7 +1376,7 @@ lodash.once@^4.0.0: resolved "https://registry.yarnpkg.com/lodash.once/-/lodash.once-4.1.1.tgz#0dd3971213c7c56df880977d504c88fb471a97ac" integrity sha1-DdOXEhPHxW34gJd9UEyI+0cal6w= -lodash@^4.16.4, lodash@^4.17.13, lodash@^4.17.15: +lodash@^4.16.4, lodash@^4.17.13, lodash@^4.17.15, lodash@^4.17.4: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -1574,6 +1626,11 @@ pify@^4.0.1: resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== +postinstall-build@^5.0.1: + version "5.0.3" + resolved "https://registry.yarnpkg.com/postinstall-build/-/postinstall-build-5.0.3.tgz#238692f712a481d8f5bc8960e94786036241efc7" + integrity sha512-vPvPe8TKgp4FLgY3+DfxCE5PIfoXBK2lyLfNCxsRbDsV6vS4oU5RG/IWxrblMn6heagbnMED3MemUQllQ2bQUg== + process@^0.11.10: version "0.11.10" resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" @@ -1814,6 +1871,15 @@ type-detect@^1.0.0: resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-1.0.0.tgz#762217cc06db258ec48908a1298e8b95121e8ea2" integrity sha1-diIXzAbbJY7EiQihKY6LlRIejqI= +typemoq@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/typemoq/-/typemoq-2.1.0.tgz#4452ce360d92cf2a1a180f0c29de2803f87af1e8" + integrity sha512-DtRNLb7x8yCTv/KHlwes+NI+aGb4Vl1iPC63Hhtcvk1DpxSAZzKWQv0RQFY0jX2Uqj0SDBNl8Na4e6MV6TNDgw== + dependencies: + circular-json "^0.3.1" + lodash "^4.17.4" + postinstall-build "^5.0.1" + unbox-primitive@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e" diff --git a/extensions/machine-learning/package.json b/extensions/machine-learning/package.json index 461d545295..ac7f1b1b5d 100644 --- a/extensions/machine-learning/package.json +++ b/extensions/machine-learning/package.json @@ -151,11 +151,10 @@ "@types/node": "^10.14.8", "@types/request": "^2.48.1", "mocha": "^7.1.1", - "mocha-junit-reporter": "^1.17.0", - "mocha-multi-reporters": "^1.1.7", "should": "^13.2.1", "typemoq": "^2.1.0", - "lodash": "^4.17.21" + "lodash": "^4.17.21", + "@microsoft/azdata-test": "^2.0.3" }, "__metadata": { "id": "65", diff --git a/extensions/machine-learning/src/test/index.ts b/extensions/machine-learning/src/test/index.ts index f7c483152e..8423c92842 100644 --- a/extensions/machine-learning/src/test/index.ts +++ b/extensions/machine-learning/src/test/index.ts @@ -3,46 +3,9 @@ * Licensed under the Source EULA. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as path from 'path'; +import { getDefaultMochaOptions } from '@microsoft/azdata-test'; import * as testRunner from '@microsoft/vscodetestcover'; -const suite = 'machine learning 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' }); +testRunner.configure(getDefaultMochaOptions('machine learning Extension Tests'), { coverConfig: '../../coverConfig.json' }); export = testRunner; diff --git a/extensions/machine-learning/yarn.lock b/extensions/machine-learning/yarn.lock index 3c58a77866..895552c65e 100644 --- a/extensions/machine-learning/yarn.lock +++ b/extensions/machine-learning/yarn.lock @@ -230,6 +230,18 @@ resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.2.tgz#26520bf09abe4a5644cd5414e37125a8954241dd" integrity sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw== +"@microsoft/azdata-test@^2.0.3": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@microsoft/azdata-test/-/azdata-test-2.0.3.tgz#652984efa2f5adc56cdae9029a4d5f33446b54d3" + integrity sha512-BgB6gGjQVXxnZHq7o5TlajZR/mJd/6AqbclrGzoyATvCEt92jRXhPzaY6XA/jMahdUGFSQwXpm45qRhZetwDig== + dependencies: + http-proxy-agent "^2.1.0" + https-proxy-agent "^2.2.4" + mocha-junit-reporter "^1.17.0" + mocha-multi-reporters "^1.1.7" + rimraf "^2.6.3" + typemoq "^2.1.0" + "@microsoft/vscodetestcover@^1.2.1": version "1.2.1" resolved "https://registry.yarnpkg.com/@microsoft/vscodetestcover/-/vscodetestcover-1.2.1.tgz#65f25132075a465a7a99688204486ee2b65ac07b" @@ -287,6 +299,13 @@ abort-controller@^3.0.0: dependencies: event-target-shim "^5.0.0" +agent-base@4, agent-base@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee" + integrity sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg== + dependencies: + es6-promisify "^5.0.0" + ajv@^6.5.5: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" @@ -519,6 +538,13 @@ dashdash@^1.12.0: dependencies: assert-plus "^1.0.0" +debug@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" + integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== + dependencies: + ms "2.0.0" + debug@3.2.6, debug@^3.1.0: version "3.2.6" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" @@ -628,6 +654,18 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" +es6-promise@^4.0.3: + version "4.2.8" + resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a" + integrity sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w== + +es6-promisify@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203" + integrity sha512-C+d6UdsYDk0lMebHNR4S2NybQMMngAOnOwYBQjTOiv0MkoJMP0Myw2mgpDLBcpfCmRLxyFqYhS/CfOENq4SJhQ== + dependencies: + es6-promise "^4.0.3" + escape-string-regexp@1.0.5, escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" @@ -893,6 +931,14 @@ html-escaper@^2.0.0: resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== +http-proxy-agent@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz#e4821beef5b2142a2026bd73926fe537631c5405" + integrity sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg== + dependencies: + agent-base "4" + debug "3.1.0" + http-signature@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" @@ -902,6 +948,14 @@ http-signature@~1.2.0: jsprim "^1.2.2" sshpk "^1.7.0" +https-proxy-agent@^2.2.4: + version "2.2.4" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz#4ee7a737abd92678a293d9b34a1af4d0d08c787b" + integrity sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg== + dependencies: + agent-base "^4.3.0" + debug "^3.1.0" + inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" diff --git a/extensions/mssql/package.json b/extensions/mssql/package.json index b954b9c8bc..6d21b2eab5 100644 --- a/extensions/mssql/package.json +++ b/extensions/mssql/package.json @@ -1348,10 +1348,9 @@ "@types/stream-meter": "^0.0.22", "@types/through2": "^2.0.34", "mocha": "^7.1.1", - "mocha-junit-reporter": "^1.17.0", - "mocha-multi-reporters": "^1.1.7", "should": "^13.2.3", "typemoq": "^2.1.0", - "@microsoft/vscodetestcover": "^1.2.1" + "@microsoft/vscodetestcover": "^1.2.1", + "@microsoft/azdata-test": "^2.0.3" } } diff --git a/extensions/mssql/src/test/index.ts b/extensions/mssql/src/test/index.ts index 343166ffa3..0c4d6ff2b2 100644 --- a/extensions/mssql/src/test/index.ts +++ b/extensions/mssql/src/test/index.ts @@ -3,46 +3,9 @@ * Licensed under the Source EULA. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as path from 'path'; +import { getDefaultMochaOptions } from '@microsoft/azdata-test'; import * as testRunner from '@microsoft/vscodetestcover'; -const suite = 'mssql 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' }); +testRunner.configure(getDefaultMochaOptions('MSSQL Extension Tests'), { coverConfig: '../../coverConfig.json' }); export = testRunner; diff --git a/extensions/mssql/yarn.lock b/extensions/mssql/yarn.lock index f19ee0a32b..e5e7fa424e 100644 --- a/extensions/mssql/yarn.lock +++ b/extensions/mssql/yarn.lock @@ -203,6 +203,18 @@ tmp "^0.0.33" yauzl "^2.10.0" +"@microsoft/azdata-test@^2.0.3": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@microsoft/azdata-test/-/azdata-test-2.0.3.tgz#652984efa2f5adc56cdae9029a4d5f33446b54d3" + integrity sha512-BgB6gGjQVXxnZHq7o5TlajZR/mJd/6AqbclrGzoyATvCEt92jRXhPzaY6XA/jMahdUGFSQwXpm45qRhZetwDig== + dependencies: + http-proxy-agent "^2.1.0" + https-proxy-agent "^2.2.4" + mocha-junit-reporter "^1.17.0" + mocha-multi-reporters "^1.1.7" + rimraf "^2.6.3" + typemoq "^2.1.0" + "@microsoft/vscodetestcover@^1.2.1": version "1.2.1" resolved "https://registry.yarnpkg.com/@microsoft/vscodetestcover/-/vscodetestcover-1.2.1.tgz#65f25132075a465a7a99688204486ee2b65ac07b" diff --git a/extensions/notebook/package.json b/extensions/notebook/package.json index 9b527f6ac5..77db5ac5c0 100644 --- a/extensions/notebook/package.json +++ b/extensions/notebook/package.json @@ -789,13 +789,12 @@ "@types/uuid": "^3.4.5", "assert": "^1.4.1", "mocha": "^7.1.1", - "mocha-junit-reporter": "^1.17.0", - "mocha-multi-reporters": "^1.1.7", "nock": "^13.0.2", "should": "^13.2.3", "sinon": "^9.0.2", "typemoq": "^2.1.0", - "@microsoft/vscodetestcover": "^1.2.1" + "@microsoft/vscodetestcover": "^1.2.1", + "@microsoft/azdata-test": "^2.0.3" }, "resolutions": { "url-parse": "^1.5.8", diff --git a/extensions/notebook/src/integrationTest/index.ts b/extensions/notebook/src/integrationTest/index.ts index 88c9bbf0af..31d980e710 100644 --- a/extensions/notebook/src/integrationTest/index.ts +++ b/extensions/notebook/src/integrationTest/index.ts @@ -3,46 +3,9 @@ * Licensed under the Source EULA. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -const path = require('path'); +import { getDefaultMochaOptions } from '@microsoft/azdata-test'; import * as testRunner from '@microsoft/vscodetestcover'; -const suite = 'notebook Extension Integration Tests'; - -const mochaOptions: any = { - ui: 'bdd', - useColors: true, - timeout: 600000 -}; - -// 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}-${process.arch}-${suite.toLowerCase().replace(/[^\w]/g, '-')}-results.xml`) - } - }; -} - -testRunner.configure(mochaOptions, { coverConfig: '../../coverConfig.json' }); +testRunner.configure(getDefaultMochaOptions('notebook Extension Integration Tests'), { coverConfig: '../../coverConfig.json' }); export = testRunner; diff --git a/extensions/notebook/src/test/index.ts b/extensions/notebook/src/test/index.ts index 7dd7ec5a91..e8bdf9eac2 100644 --- a/extensions/notebook/src/test/index.ts +++ b/extensions/notebook/src/test/index.ts @@ -3,46 +3,9 @@ * Licensed under the Source EULA. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as path from 'path'; +import { getDefaultMochaOptions } from '@microsoft/azdata-test'; import * as testRunner from '@microsoft/vscodetestcover'; -const suite = 'notebook 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' }); +testRunner.configure(getDefaultMochaOptions('Notebook Extension Tests'), { coverConfig: '../../coverConfig.json' }); export = testRunner; diff --git a/extensions/notebook/yarn.lock b/extensions/notebook/yarn.lock index 7abd90c432..4573404b21 100644 --- a/extensions/notebook/yarn.lock +++ b/extensions/notebook/yarn.lock @@ -259,6 +259,18 @@ resolved "https://registry.yarnpkg.com/@microsoft/applicationinsights-shims/-/applicationinsights-shims-2.0.1.tgz#5d72fb7aaf4056c4fda54f9d7c93ccf8ca9bcbfd" integrity sha512-G0MXf6R6HndRbDy9BbEj0zrLeuhwt2nsXk2zKtF0TnYo39KgYqhYC2ayIzKPTm2KAE+xzD7rgyLdZnrcRvt9WQ== +"@microsoft/azdata-test@^2.0.3": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@microsoft/azdata-test/-/azdata-test-2.0.3.tgz#652984efa2f5adc56cdae9029a4d5f33446b54d3" + integrity sha512-BgB6gGjQVXxnZHq7o5TlajZR/mJd/6AqbclrGzoyATvCEt92jRXhPzaY6XA/jMahdUGFSQwXpm45qRhZetwDig== + dependencies: + http-proxy-agent "^2.1.0" + https-proxy-agent "^2.2.4" + mocha-junit-reporter "^1.17.0" + mocha-multi-reporters "^1.1.7" + rimraf "^2.6.3" + typemoq "^2.1.0" + "@microsoft/dynamicproto-js@^1.1.6": version "1.1.6" resolved "https://registry.yarnpkg.com/@microsoft/dynamicproto-js/-/dynamicproto-js-1.1.6.tgz#6fe03468862861f5f88ac4c3959a652b3797f1bc" @@ -511,6 +523,13 @@ adm-zip@^0.4.14: resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.14.tgz#2cf312bcc9f8875df835b0f6040bd89be0a727a9" integrity sha512-/9aQCnQHF+0IiCl0qhXoK7qs//SwYE7zX8lsr/DNk1BRAHYxeLZPL4pguwK29gUEqasYQjqPtEpDRSWEkdHn9g== +agent-base@4, agent-base@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee" + integrity sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg== + dependencies: + es6-promisify "^5.0.0" + ajv@^6.12.3, ajv@^6.5.5, ajv@~5.1.6: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" @@ -762,6 +781,13 @@ dashdash@^1.12.0: dependencies: assert-plus "^1.0.0" +debug@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" + integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== + dependencies: + ms "2.0.0" + debug@3.2.6, debug@^3.1.0: version "3.2.6" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" @@ -883,6 +909,18 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" +es6-promise@^4.0.3: + version "4.2.8" + resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a" + integrity sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w== + +es6-promisify@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203" + integrity sha512-C+d6UdsYDk0lMebHNR4S2NybQMMngAOnOwYBQjTOiv0MkoJMP0Myw2mgpDLBcpfCmRLxyFqYhS/CfOENq4SJhQ== + dependencies: + es6-promise "^4.0.3" + escape-string-regexp@1.0.5, escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" @@ -1167,6 +1205,14 @@ html-escaper@^2.0.0: resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== +http-proxy-agent@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz#e4821beef5b2142a2026bd73926fe537631c5405" + integrity sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg== + dependencies: + agent-base "4" + debug "3.1.0" + http-signature@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" @@ -1176,6 +1222,14 @@ http-signature@~1.2.0: jsprim "^1.2.2" sshpk "^1.7.0" +https-proxy-agent@^2.2.4: + version "2.2.4" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz#4ee7a737abd92678a293d9b34a1af4d0d08c787b" + integrity sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg== + dependencies: + agent-base "^4.3.0" + debug "^3.1.0" + inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" diff --git a/extensions/query-history/package.json b/extensions/query-history/package.json index 3cace7c58d..eb92eb9929 100644 --- a/extensions/query-history/package.json +++ b/extensions/query-history/package.json @@ -190,7 +190,7 @@ }, "dependencies": {}, "devDependencies": { - "@microsoft/azdata-test": "^2.0.0", + "@microsoft/azdata-test": "^2.0.3", "@microsoft/vscodetestcover": "^1.2.1", "@types/mocha": "^7.0.2", "@types/node": "^12.11.7", diff --git a/extensions/query-history/src/test/index.ts b/extensions/query-history/src/test/index.ts index 079005d3b7..f7518a3506 100644 --- a/extensions/query-history/src/test/index.ts +++ b/extensions/query-history/src/test/index.ts @@ -3,46 +3,9 @@ * Licensed under the Source EULA. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as path from 'path'; +import { getDefaultMochaOptions } from '@microsoft/azdata-test'; 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' }); +testRunner.configure(getDefaultMochaOptions('Query History Extension Tests'), { coverConfig: '../../coverConfig.json' }); export = testRunner; diff --git a/extensions/query-history/yarn.lock b/extensions/query-history/yarn.lock index 82fa68d950..fcf32aef7a 100644 --- a/extensions/query-history/yarn.lock +++ b/extensions/query-history/yarn.lock @@ -228,13 +228,15 @@ "@jridgewell/resolve-uri" "^3.0.3" "@jridgewell/sourcemap-codec" "^1.4.10" -"@microsoft/azdata-test@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@microsoft/azdata-test/-/azdata-test-2.0.0.tgz#5b7d4ba0114ebd5ccae7d88e6982c847b1e76b06" - integrity sha512-vXfmBoc6hlbrdIqXLfbLEzw/cj5CJfpvw1mmMhO6hpSGSYqa1pm7e3dXn3fAbTjiumdSnLN1iIuOba1ggz24nA== +"@microsoft/azdata-test@^2.0.3": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@microsoft/azdata-test/-/azdata-test-2.0.3.tgz#652984efa2f5adc56cdae9029a4d5f33446b54d3" + integrity sha512-BgB6gGjQVXxnZHq7o5TlajZR/mJd/6AqbclrGzoyATvCEt92jRXhPzaY6XA/jMahdUGFSQwXpm45qRhZetwDig== dependencies: http-proxy-agent "^2.1.0" https-proxy-agent "^2.2.4" + mocha-junit-reporter "^1.17.0" + mocha-multi-reporters "^1.1.7" rimraf "^2.6.3" typemoq "^2.1.0" @@ -397,6 +399,11 @@ chalk@^2.0.0, chalk@^2.4.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" +charenc@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/charenc/-/charenc-0.0.2.tgz#c0a1d2f3a7092e03774bfa83f14c0fc5790a8667" + integrity sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA== + chokidar@3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.3.0.tgz#12c0714668c55800f659e262d4962a97faf554a6" @@ -450,6 +457,11 @@ convert-source-map@^1.7.0: dependencies: safe-buffer "~5.1.1" +crypt@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/crypt/-/crypt-0.0.2.tgz#88d7ff7ec0dfb86f713dc87bbb42d044d3e6c41b" + integrity sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow== + debug@3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" @@ -464,6 +476,13 @@ debug@3.2.6: dependencies: ms "^2.1.1" +debug@^2.2.0: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + debug@^3.1.0: version "3.2.7" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" @@ -820,6 +839,11 @@ is-boolean-object@^1.1.0: call-bind "^1.0.2" has-tostringtag "^1.0.0" +is-buffer@~1.1.6: + version "1.1.6" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" + integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== + is-buffer@~2.0.3: version "2.0.5" resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.5.tgz#ebc252e400d22ff8d77fa09888821a24a658c191" @@ -1025,6 +1049,15 @@ make-dir@^3.0.0: dependencies: semver "^6.0.0" +md5@^2.1.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/md5/-/md5-2.3.0.tgz#c3da9a6aae3a30b46b7b0c349b87b110dc3bda4f" + integrity sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g== + dependencies: + charenc "0.0.2" + crypt "0.0.2" + is-buffer "~1.1.6" + minimatch@3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" @@ -1039,7 +1072,7 @@ minimatch@^3.0.4, minimatch@^3.1.1: dependencies: brace-expansion "^1.1.7" -minimist@^1.2.5: +minimist@^1.2.5, minimist@^1.2.6: version "1.2.6" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== @@ -1051,6 +1084,32 @@ mkdirp@0.5.5: dependencies: minimist "^1.2.5" +mkdirp@~0.5.1: + version "0.5.6" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" + integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== + dependencies: + minimist "^1.2.6" + +mocha-junit-reporter@^1.17.0: + version "1.23.3" + resolved "https://registry.yarnpkg.com/mocha-junit-reporter/-/mocha-junit-reporter-1.23.3.tgz#941e219dd759ed732f8641e165918aa8b167c981" + integrity sha512-ed8LqbRj1RxZfjt/oC9t12sfrWsjZ3gNnbhV1nuj9R/Jb5/P3Xb4duv2eCfCDMYH+fEu0mqca7m4wsiVjsxsvA== + dependencies: + debug "^2.2.0" + md5 "^2.1.0" + mkdirp "~0.5.1" + strip-ansi "^4.0.0" + xml "^1.0.0" + +mocha-multi-reporters@^1.1.7: + version "1.5.1" + resolved "https://registry.yarnpkg.com/mocha-multi-reporters/-/mocha-multi-reporters-1.5.1.tgz#c73486bed5519e1d59c9ce39ac7a9792600e5676" + integrity sha512-Yb4QJOaGLIcmB0VY7Wif5AjvLMUFAdV57D2TWEva1Y0kU/3LjKpeRVmlMIfuO1SVbauve459kgtIizADqxMWPg== + dependencies: + debug "^4.1.1" + lodash "^4.17.15" + mocha@^7.1.1: version "7.2.0" resolved "https://registry.yarnpkg.com/mocha/-/mocha-7.2.0.tgz#01cc227b00d875ab1eed03a75106689cfed5a604" @@ -1494,6 +1553,11 @@ wrappy@1: resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== +xml@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/xml/-/xml-1.0.1.tgz#78ba72020029c5bc87b8a81a3cfcd74b4a2fc1e5" + integrity sha512-huCv9IH9Tcf95zuYCsQraZtWnJvBtLVE0QHMOs8bWyZAFZNDcYjsPq1nEx8jKA9y+Beo9v+7OBPRisQTjinQMw== + y18n@^4.0.0: version "4.0.3" resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.3.tgz#b5f259c82cd6e336921efd7bfd8bf560de9eeedf" diff --git a/extensions/resource-deployment/package.json b/extensions/resource-deployment/package.json index ee050f6f96..cfec961c47 100644 --- a/extensions/resource-deployment/package.json +++ b/extensions/resource-deployment/package.json @@ -538,10 +538,8 @@ "@types/semver": "^7.3.1", "@types/sinon": "^9.0.8", "@types/yamljs": "0.2.30", - "@microsoft/azdata-test": "^1.5.2", + "@microsoft/azdata-test": "^2.0.3", "mocha": "^7.1.1", - "mocha-junit-reporter": "^1.17.0", - "mocha-multi-reporters": "^1.1.7", "should": "^13.2.3", "sinon": "^9.2.0", "typemoq": "^2.1.0", diff --git a/extensions/resource-deployment/src/test/index.ts b/extensions/resource-deployment/src/test/index.ts index 727cb7fc18..449f9cdff1 100644 --- a/extensions/resource-deployment/src/test/index.ts +++ b/extensions/resource-deployment/src/test/index.ts @@ -3,46 +3,9 @@ * Licensed under the Source EULA. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as path from 'path'; +import { getDefaultMochaOptions } from '@microsoft/azdata-test'; import * as testRunner from '@microsoft/vscodetestcover'; -const suite = 'resource-deployment 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' }); +testRunner.configure(getDefaultMochaOptions('Resource Deployment Extension Tests'), { coverConfig: '../../coverConfig.json' }); export = testRunner; diff --git a/extensions/resource-deployment/src/test/ui/validation/modelViewUtils.test.ts b/extensions/resource-deployment/src/test/ui/validation/modelViewUtils.test.ts index e33bf68722..4361b72354 100644 --- a/extensions/resource-deployment/src/test/ui/validation/modelViewUtils.test.ts +++ b/extensions/resource-deployment/src/test/ui/validation/modelViewUtils.test.ts @@ -26,7 +26,7 @@ describe('WizardPage', () => { const mockWizardPage = TypeMoq.Mock.ofType(); stubCheckbox = new azdataTest.stubs.modelView.StubCheckbox(); stubInputBox = new azdataTest.stubs.modelView.StubInputBox(); - const mockModelView = azdataTest.mocks.modelView.createModelViewMock({ + const mockModelView = azdataTest.mocks.azdata.modelView.createModelViewMock({ checkBox: () => stubCheckbox, inputBox: () => stubInputBox }); diff --git a/extensions/resource-deployment/yarn.lock b/extensions/resource-deployment/yarn.lock index 41b58c85b4..aaf3f55f48 100644 --- a/extensions/resource-deployment/yarn.lock +++ b/extensions/resource-deployment/yarn.lock @@ -227,13 +227,15 @@ resolved "https://registry.yarnpkg.com/@microsoft/applicationinsights-shims/-/applicationinsights-shims-2.0.1.tgz#5d72fb7aaf4056c4fda54f9d7c93ccf8ca9bcbfd" integrity sha512-G0MXf6R6HndRbDy9BbEj0zrLeuhwt2nsXk2zKtF0TnYo39KgYqhYC2ayIzKPTm2KAE+xzD7rgyLdZnrcRvt9WQ== -"@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== +"@microsoft/azdata-test@^2.0.3": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@microsoft/azdata-test/-/azdata-test-2.0.3.tgz#652984efa2f5adc56cdae9029a4d5f33446b54d3" + integrity sha512-BgB6gGjQVXxnZHq7o5TlajZR/mJd/6AqbclrGzoyATvCEt92jRXhPzaY6XA/jMahdUGFSQwXpm45qRhZetwDig== dependencies: http-proxy-agent "^2.1.0" https-proxy-agent "^2.2.4" + mocha-junit-reporter "^1.17.0" + mocha-multi-reporters "^1.1.7" rimraf "^2.6.3" typemoq "^2.1.0" diff --git a/extensions/schema-compare/package.json b/extensions/schema-compare/package.json index adb2708865..addc89484a 100644 --- a/extensions/schema-compare/package.json +++ b/extensions/schema-compare/package.json @@ -115,14 +115,12 @@ "vscode-nls": "^4.0.0" }, "devDependencies": { - "@microsoft/azdata-test": "^1.5.2", + "@microsoft/azdata-test": "^2.0.3", "@microsoft/vscodetestcover": "^1.2.1", "@types/mocha": "^7.0.2", "@types/node": "^12.11.7", "@types/sinon": "^9.0.4", "mocha": "^7.1.1", - "mocha-junit-reporter": "^1.17.0", - "mocha-multi-reporters": "^1.1.7", "should": "^13.2.1", "sinon": "^9.0.2", "typemoq": "^2.1.0" diff --git a/extensions/schema-compare/src/test/index.ts b/extensions/schema-compare/src/test/index.ts index 41ae4fdb21..6c9c886f53 100644 --- a/extensions/schema-compare/src/test/index.ts +++ b/extensions/schema-compare/src/test/index.ts @@ -3,46 +3,9 @@ * Licensed under the Source EULA. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as path from 'path'; +import { getDefaultMochaOptions } from '@microsoft/azdata-test'; import * as testRunner from '@microsoft/vscodetestcover'; -const suite = 'schema-compare 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' }); +testRunner.configure(getDefaultMochaOptions('Schema Compare Extension Tests'), { coverConfig: '../../coverConfig.json' }); export = testRunner; diff --git a/extensions/schema-compare/yarn.lock b/extensions/schema-compare/yarn.lock index 8b35906bbf..600a001a2e 100644 --- a/extensions/schema-compare/yarn.lock +++ b/extensions/schema-compare/yarn.lock @@ -220,13 +220,15 @@ resolved "https://registry.yarnpkg.com/@microsoft/applicationinsights-shims/-/applicationinsights-shims-2.0.1.tgz#5d72fb7aaf4056c4fda54f9d7c93ccf8ca9bcbfd" integrity sha512-G0MXf6R6HndRbDy9BbEj0zrLeuhwt2nsXk2zKtF0TnYo39KgYqhYC2ayIzKPTm2KAE+xzD7rgyLdZnrcRvt9WQ== -"@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== +"@microsoft/azdata-test@^2.0.3": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@microsoft/azdata-test/-/azdata-test-2.0.3.tgz#652984efa2f5adc56cdae9029a4d5f33446b54d3" + integrity sha512-BgB6gGjQVXxnZHq7o5TlajZR/mJd/6AqbclrGzoyATvCEt92jRXhPzaY6XA/jMahdUGFSQwXpm45qRhZetwDig== dependencies: http-proxy-agent "^2.1.0" https-proxy-agent "^2.2.4" + mocha-junit-reporter "^1.17.0" + mocha-multi-reporters "^1.1.7" rimraf "^2.6.3" typemoq "^2.1.0" diff --git a/extensions/sql-bindings/package.json b/extensions/sql-bindings/package.json index 41eec2baa3..8f3d9536ea 100644 --- a/extensions/sql-bindings/package.json +++ b/extensions/sql-bindings/package.json @@ -79,7 +79,6 @@ "typemoq": "^2.1.0", "@microsoft/vscodetestcover": "^1.2.1", "mocha": "^7.1.1", - "mocha-junit-reporter": "^1.17.0", - "mocha-multi-reporters": "^1.1.7" + "@microsoft/azdata-test": "^2.0.3" } } diff --git a/extensions/sql-bindings/src/test/index.ts b/extensions/sql-bindings/src/test/index.ts index f0f728b698..b399eb69f1 100644 --- a/extensions/sql-bindings/src/test/index.ts +++ b/extensions/sql-bindings/src/test/index.ts @@ -3,46 +3,9 @@ * Licensed under the Source EULA. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as path from 'path'; +import { getDefaultMochaOptions } from '@microsoft/azdata-test'; import * as testRunner from '@microsoft/vscodetestcover'; -const suite = 'SQL Bindings 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' }); +testRunner.configure(getDefaultMochaOptions('SQL Binding Extension Tests'), { coverConfig: '../../coverConfig.json' }); export = testRunner; diff --git a/extensions/sql-bindings/yarn.lock b/extensions/sql-bindings/yarn.lock index 9c5d9574f8..40bbbe15e5 100644 --- a/extensions/sql-bindings/yarn.lock +++ b/extensions/sql-bindings/yarn.lock @@ -260,6 +260,18 @@ resolved "https://registry.yarnpkg.com/@microsoft/applicationinsights-shims/-/applicationinsights-shims-2.0.1.tgz#5d72fb7aaf4056c4fda54f9d7c93ccf8ca9bcbfd" integrity sha512-G0MXf6R6HndRbDy9BbEj0zrLeuhwt2nsXk2zKtF0TnYo39KgYqhYC2ayIzKPTm2KAE+xzD7rgyLdZnrcRvt9WQ== +"@microsoft/azdata-test@^2.0.3": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@microsoft/azdata-test/-/azdata-test-2.0.3.tgz#652984efa2f5adc56cdae9029a4d5f33446b54d3" + integrity sha512-BgB6gGjQVXxnZHq7o5TlajZR/mJd/6AqbclrGzoyATvCEt92jRXhPzaY6XA/jMahdUGFSQwXpm45qRhZetwDig== + dependencies: + http-proxy-agent "^2.1.0" + https-proxy-agent "^2.2.4" + mocha-junit-reporter "^1.17.0" + mocha-multi-reporters "^1.1.7" + rimraf "^2.6.3" + typemoq "^2.1.0" + "@microsoft/dynamicproto-js@^1.1.6": version "1.1.6" resolved "https://registry.yarnpkg.com/@microsoft/dynamicproto-js/-/dynamicproto-js-1.1.6.tgz#6fe03468862861f5f88ac4c3959a652b3797f1bc" @@ -366,6 +378,13 @@ "@microsoft/1ds-core-js" "^3.2.3" "@microsoft/1ds-post-js" "^3.2.3" +agent-base@4, agent-base@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee" + integrity sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg== + dependencies: + es6-promisify "^5.0.0" + ansi-colors@3.2.3: version "3.2.3" resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.3.tgz#57d35b8686e851e2cc04c403f1c00203976a1813" @@ -558,6 +577,13 @@ dayjs@^1.9.3: resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.1.tgz#90b33a3dda3417258d48ad2771b415def6545eb0" integrity sha512-ER7EjqVAMkRRsxNCC5YqJ9d9VQYuWdGt7aiH2qA5R5wt8ZmWaP2dLUSIK6y/kVzLMlmh1Tvu5xUf4M/wdGJ5KA== +debug@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" + integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== + dependencies: + ms "2.0.0" + debug@3.2.6: version "3.2.6" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" @@ -572,6 +598,13 @@ debug@^2.2.0: dependencies: ms "2.0.0" +debug@^3.1.0: + version "3.2.7" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" + integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== + dependencies: + ms "^2.1.1" + debug@^4.1.0, debug@^4.1.1: version "4.3.3" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.3.tgz#04266e0b70a98d4462e6e288e38259213332b664" @@ -712,6 +745,18 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" +es6-promise@^4.0.3: + version "4.2.8" + resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a" + integrity sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w== + +es6-promisify@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203" + integrity sha512-C+d6UdsYDk0lMebHNR4S2NybQMMngAOnOwYBQjTOiv0MkoJMP0Myw2mgpDLBcpfCmRLxyFqYhS/CfOENq4SJhQ== + dependencies: + es6-promise "^4.0.3" + escalade@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" @@ -947,6 +992,22 @@ htmlparser2@^3.10.1: inherits "^2.0.1" readable-stream "^3.1.1" +http-proxy-agent@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz#e4821beef5b2142a2026bd73926fe537631c5405" + integrity sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg== + dependencies: + agent-base "4" + debug "3.1.0" + +https-proxy-agent@^2.2.4: + version "2.2.4" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz#4ee7a737abd92678a293d9b34a1af4d0d08c787b" + integrity sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg== + dependencies: + agent-base "^4.3.0" + debug "^3.1.0" + inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" diff --git a/extensions/sql-database-projects/package.json b/extensions/sql-database-projects/package.json index d8949c1a2c..3df6c42e92 100644 --- a/extensions/sql-database-projects/package.json +++ b/extensions/sql-database-projects/package.json @@ -501,11 +501,10 @@ "@types/which": "^2.0.1", "@types/xml-formatter": "^1.1.0", "mocha": "^7.1.1", - "mocha-junit-reporter": "^1.17.0", - "mocha-multi-reporters": "^1.1.7", "should": "^13.2.1", "sinon": "^9.0.2", - "typemoq": "^2.1.0" + "typemoq": "^2.1.0", + "@microsoft/azdata-test": "^2.0.3" }, "__metadata": { "id": "70", diff --git a/extensions/sql-database-projects/src/test/index.ts b/extensions/sql-database-projects/src/test/index.ts index 3556d9e084..62bef05fa8 100644 --- a/extensions/sql-database-projects/src/test/index.ts +++ b/extensions/sql-database-projects/src/test/index.ts @@ -3,46 +3,9 @@ * Licensed under the Source EULA. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as path from 'path'; +import { getDefaultMochaOptions } from '@microsoft/azdata-test'; import * as testRunner from '@microsoft/vscodetestcover'; -const suite = 'Database Projects 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' }); +testRunner.configure(getDefaultMochaOptions('Database Project Extension Tests'), { coverConfig: '../../coverConfig.json' }); export = testRunner; diff --git a/extensions/sql-database-projects/yarn.lock b/extensions/sql-database-projects/yarn.lock index e13fc424f2..f49d7eb201 100644 --- a/extensions/sql-database-projects/yarn.lock +++ b/extensions/sql-database-projects/yarn.lock @@ -260,6 +260,18 @@ resolved "https://registry.npmjs.org/@microsoft/applicationinsights-shims/-/applicationinsights-shims-2.0.1.tgz" integrity sha512-G0MXf6R6HndRbDy9BbEj0zrLeuhwt2nsXk2zKtF0TnYo39KgYqhYC2ayIzKPTm2KAE+xzD7rgyLdZnrcRvt9WQ== +"@microsoft/azdata-test@^2.0.3": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@microsoft/azdata-test/-/azdata-test-2.0.3.tgz#652984efa2f5adc56cdae9029a4d5f33446b54d3" + integrity sha512-BgB6gGjQVXxnZHq7o5TlajZR/mJd/6AqbclrGzoyATvCEt92jRXhPzaY6XA/jMahdUGFSQwXpm45qRhZetwDig== + dependencies: + http-proxy-agent "^2.1.0" + https-proxy-agent "^2.2.4" + mocha-junit-reporter "^1.17.0" + mocha-multi-reporters "^1.1.7" + rimraf "^2.6.3" + typemoq "^2.1.0" + "@microsoft/dynamicproto-js@^1.1.6": version "1.1.6" resolved "https://registry.npmjs.org/@microsoft/dynamicproto-js/-/dynamicproto-js-1.1.6.tgz" @@ -408,6 +420,13 @@ resolved "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.2.tgz" integrity sha512-+R0juSseERyoPvnBQ/cZih6bpF7IpCXlWbHRoCRzYzqpz6gWHOgf8o4MOEf6KBVuOyqU+gCNLkCWVIJAro8XyQ== +agent-base@4, agent-base@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee" + integrity sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg== + dependencies: + es6-promisify "^5.0.0" + ajv@^6.12.3: version "6.12.6" resolved "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz" @@ -669,6 +688,13 @@ dashdash@^1.12.0: dependencies: assert-plus "^1.0.0" +debug@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" + integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== + dependencies: + ms "2.0.0" + debug@3.2.6: version "3.2.6" resolved "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz" @@ -683,6 +709,13 @@ debug@^2.2.0: dependencies: ms "2.0.0" +debug@^3.1.0: + version "3.2.7" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" + integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== + dependencies: + ms "^2.1.1" + debug@^4.1.0, debug@^4.1.1: version "4.3.3" resolved "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz" @@ -795,6 +828,18 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" +es6-promise@^4.0.3: + version "4.2.8" + resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a" + integrity sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w== + +es6-promisify@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203" + integrity sha512-C+d6UdsYDk0lMebHNR4S2NybQMMngAOnOwYBQjTOiv0MkoJMP0Myw2mgpDLBcpfCmRLxyFqYhS/CfOENq4SJhQ== + dependencies: + es6-promise "^4.0.3" + escalade@^3.1.1: version "3.1.1" resolved "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz" @@ -1114,6 +1159,14 @@ html-escaper@^2.0.0: resolved "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz" integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== +http-proxy-agent@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz#e4821beef5b2142a2026bd73926fe537631c5405" + integrity sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg== + dependencies: + agent-base "4" + debug "3.1.0" + http-signature@~1.2.0: version "1.2.0" resolved "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz" @@ -1123,6 +1176,14 @@ http-signature@~1.2.0: jsprim "^1.2.2" sshpk "^1.7.0" +https-proxy-agent@^2.2.4: + version "2.2.4" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz#4ee7a737abd92678a293d9b34a1af4d0d08c787b" + integrity sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg== + dependencies: + agent-base "^4.3.0" + debug "^3.1.0" + inflight@^1.0.4: version "1.0.6" resolved "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz" diff --git a/scripts/sql-test-integration-unstable.bat b/scripts/sql-test-integration-unstable.bat deleted file mode 100644 index 73bdc502b7..0000000000 --- a/scripts/sql-test-integration-unstable.bat +++ /dev/null @@ -1,10 +0,0 @@ -setlocal - -set ADS_TEST_GREP=@UNSTABLE@ -set ADS_TEST_INVERT_GREP= - -echo Running UNSTABLE ADS Extension Integration tests - -call %~dp0\sql-test-integration.bat - -endlocal diff --git a/scripts/sql-test-integration-unstable.sh b/scripts/sql-test-integration-unstable.sh deleted file mode 100755 index df07fe522c..0000000000 --- a/scripts/sql-test-integration-unstable.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash -set -e - -if [[ "$OSTYPE" == "darwin"* ]]; then - realpath() { [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"; } - ROOT=$(dirname $(dirname $(realpath "$0"))) -else - ROOT=$(dirname $(dirname $(readlink -f $0))) -fi - -cd $ROOT - -export ADS_TEST_GREP="(.*@UNSTABLE@|integration test setup)" -export ADS_TEST_INVERT_GREP=0 - -echo Running UNSTABLE ADS Extension Integration tests - -./scripts/sql-test-integration.sh diff --git a/scripts/sql-test-integration.bat b/scripts/sql-test-integration.bat index fff177b87c..ee91c6655d 100644 --- a/scripts/sql-test-integration.bat +++ b/scripts/sql-test-integration.bat @@ -31,13 +31,6 @@ if "%INTEGRATION_TEST_ELECTRON_PATH%"=="" ( echo "Running integration tests with '%INTEGRATION_TEST_ELECTRON_PATH%' as build." ) -:: Default to only running stable tests if test grep isn't set -if "%ADS_TEST_GREP%" == "" ( - echo Running stable tests only - set ADS_TEST_GREP=@UNSTABLE@ - SET ADS_TEST_INVERT_GREP=1 -) - if "%SKIP_PYTHON_INSTALL_TEST%" == "1" ( echo Skipping Python installation tests. ) else ( diff --git a/scripts/sql-test-integration.sh b/scripts/sql-test-integration.sh index fafaebe858..919101472a 100755 --- a/scripts/sql-test-integration.sh +++ b/scripts/sql-test-integration.sh @@ -13,13 +13,6 @@ else LINUX_NO_SANDBOX="--no-sandbox" # Electron 6 introduces a chrome-sandbox that requires root to run. This can fail. Disable sandbox via --no-sandbox. fi -# Default to only running stable tests if test grep isn't set -if [[ "$ADS_TEST_GREP" == "" ]]; then - echo Running stable tests only - export ADS_TEST_GREP=@UNSTABLE@ - export ADS_TEST_INVERT_GREP=1 -fi - # Figure out which Electron to use for running tests if [ -z "$INTEGRATION_TEST_ELECTRON_PATH" ] then diff --git a/scripts/test-extensions-unit-unstable.bat b/scripts/test-extensions-unit-unstable.bat deleted file mode 100755 index 50af756131..0000000000 --- a/scripts/test-extensions-unit-unstable.bat +++ /dev/null @@ -1,12 +0,0 @@ -:: Runs UNSTABLE Extension Tests - -setlocal - -set ADS_TEST_GREP=@UNSTABLE@ -set ADS_TEST_INVERT_GREP= - -echo Running UNSTABLE Extension Tests - -call %~dp0\test-extensions-unit.bat - -endlocal diff --git a/scripts/test-extensions-unit-unstable.sh b/scripts/test-extensions-unit-unstable.sh deleted file mode 100755 index a45e3b5423..0000000000 --- a/scripts/test-extensions-unit-unstable.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -set -e - -if [[ "$OSTYPE" == "darwin"* ]]; then - realpath() { [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"; } - ROOT=$(dirname $(dirname $(realpath "$0"))) -else - ROOT=$(dirname $(dirname $(readlink -f $0))) -fi - -cd $ROOT - -export ADS_TEST_GREP=@UNSTABLE@ -export ADS_TEST_INVERT_GREP= -echo Running UNSTABLE Extension Tests - -./scripts/test-extensions-unit.sh diff --git a/scripts/test-extensions-unit.bat b/scripts/test-extensions-unit.bat index a0acdf7ed6..9899d0d163 100755 --- a/scripts/test-extensions-unit.bat +++ b/scripts/test-extensions-unit.bat @@ -49,13 +49,6 @@ if "%INTEGRATION_TEST_ELECTRON_PATH%"=="" ( echo Running unit tests with '%INTEGRATION_TEST_ELECTRON_PATH%' as build. ) -:: Default to only running stable tests if test grep isn't set -if "%ADS_TEST_GREP%" == "" ( - echo "Running stable tests only" - set ADS_TEST_GREP=@UNSTABLE@ - SET ADS_TEST_INVERT_GREP=1 -) - set ALL_PLATFORMS_API_TESTS_EXTRA_ARGS=--disable-telemetry --crash-reporter-directory=%VSCODECRASHDIR% --no-cached-data --disable-updates --user-data-dir=%VSCODEUSERDATADIR% --remote-debugging-port=9222 --extensions-dir=%VSCODEEXTENSIONSDIR% echo *************************************************** diff --git a/scripts/test-extensions-unit.js b/scripts/test-extensions-unit.js index f70f7636f1..d541d39bbc 100644 --- a/scripts/test-extensions-unit.js +++ b/scripts/test-extensions-unit.js @@ -53,13 +53,6 @@ else { console.log(`Running unit tests with '${process.env.INTEGRATION_TEST_ELECTRON_PATH}' as build.`); } -if (!process.env.ADS_TEST_GREP) { - console.log('Running stable tests only'); - - process.env.ADS_TEST_GREP = '@UNSTABLE@'; - process.env.ADS_TEST_INVERT_GREP = 1; -} - // execute tests for (const ext of argv.extensions) { diff --git a/scripts/test-extensions-unit.sh b/scripts/test-extensions-unit.sh index 807afb1130..4c7650e60c 100755 --- a/scripts/test-extensions-unit.sh +++ b/scripts/test-extensions-unit.sh @@ -15,13 +15,6 @@ VSCODEEXTDIR=`mktemp -d -t adsext_XXXXXXXXXX 2>/dev/null` VSCODECRASHDIR=$ROOT/.build/crashes cd $ROOT -# Default to only running stable tests if test grep isn't set -if [[ "$ADS_TEST_GREP" == "" ]]; then - echo Running stable tests only - export ADS_TEST_GREP=@UNSTABLE@ - export ADS_TEST_INVERT_GREP=1 -fi - # Figure out which Electron to use for running tests if [ -z "$INTEGRATION_TEST_ELECTRON_PATH" ] then