Skip to content

Commit

Permalink
Enable datavirtualization tests (microsoft#22378)
Browse files Browse the repository at this point in the history
* Enable datavirtualization tests

* Remove unneeded
  • Loading branch information
Charles-Gagnon authored Mar 20, 2023
1 parent 47ce587 commit 7bf1111
Show file tree
Hide file tree
Showing 8 changed files with 105 additions and 31 deletions.
2 changes: 1 addition & 1 deletion build/azure-pipelines/sql-product-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ stages:
steps:
- template: linux/sql-product-build-linux.yml
parameters:
extensionsToUnitTest: ["admin-tool-ext-win", "agent", "azcli", "azurecore", "cms", "dacpac", "data-workspace", "import", "machine-learning", "notebook", "resource-deployment", "schema-compare", "sql-bindings", "sql-database-projects"]
extensionsToUnitTest: ["admin-tool-ext-win", "agent", "azcli", "azurecore", "cms", "dacpac", "datavirtualization", "data-workspace", "import", "machine-learning", "notebook", "resource-deployment", "schema-compare", "sql-bindings", "sql-database-projects"]
timeoutInMinutes: 90

- stage: Windows
Expand Down
8 changes: 1 addition & 7 deletions extensions/datavirtualization/coverConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,7 @@
"relativeSourcePath": "..",
"relativeCoverageDir": "../../coverage",
"ignorePatterns": [
"**/node_modules/**",
"**/libs/**",
"**/lib/**",
"**/htmlcontent/**/*.js",
"**/*.bundle.js",
"**/markdown-language-features/**",
"**/media/*.js"
"**/node_modules/**"
],
"includePid": false,
"reports": [
Expand Down
2 changes: 1 addition & 1 deletion extensions/datavirtualization/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@
"vscode-nls": "^5.2.0"
},
"devDependencies": {
"@microsoft/azdata-test": "^3.0.2",
"@microsoft/vscodetestcover": "^1.2.1",
"mocha": "^7.1.1",
"should": "^13.2.1",
"typemoq": "^2.1.0"
}
Expand Down
25 changes: 4 additions & 21 deletions extensions/datavirtualization/src/test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,9 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import * as IstanbulTestRunner from '@microsoft/vscodetestcover';
let testRunner: any = IstanbulTestRunner;
import { getDefaultMochaOptions } from '@microsoft/azdata-test';
import * as testRunner from '@microsoft/vscodetestcover';

// You can directly control Mocha options by uncommenting the following lines
// See https://github.com/mochajs/mocha/wiki/Using-mocha-programmatically#set-options for more info
testRunner.configure(
// Mocha Options
{
ui: 'bdd', // the TDD UI is being used in extension.test.ts (suite, test, etc.)
reporter: 'pm-mocha-jenkins-reporter',
reporterOptions: {
junit_report_name: 'Extension Tests',
junit_report_path: __dirname + '/../../test-reports/extension_tests.xml',
junit_report_stack: 1
},
useColors: true // colored output from test results
},
// Coverage configuration options
{
coverConfig: '../../coverconfig.json'
});
testRunner.configure(getDefaultMochaOptions('Data Virtualization Extension Tests'), { coverConfig: '../../coverConfig.json' });

module.exports = testRunner;
export = testRunner;
86 changes: 85 additions & 1 deletion extensions/datavirtualization/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,18 @@
tmp "^0.0.33"
yauzl "^2.10.0"

"@microsoft/azdata-test@^3.0.2":
version "3.0.2"
resolved "https://registry.yarnpkg.com/@microsoft/azdata-test/-/azdata-test-3.0.2.tgz#71cfbbc2ee9c1805311f3a5828b50679a5e6d73c"
integrity sha512-NMoSKp/Zgs+1ZIe07w+FeKhqMaxgViLGmLTQHPfYN7RRTFErJBd8JgskxYoLZbgcctfVsV+Yw+zQEn1+g2mPKg==
dependencies:
http-proxy-agent "^5.0.0"
https-proxy-agent "^5.0.0"
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"
Expand Down Expand Up @@ -404,6 +416,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"
Expand Down Expand Up @@ -467,6 +484,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==

"dataprotocol-client@github:Microsoft/sqlops-dataprotocolclient#1.3.2":
version "1.3.2"
resolved "https://codeload.github.com/Microsoft/sqlops-dataprotocolclient/tar.gz/e3be16cffbac882ef545e4da9654a82dc010d1b7"
Expand All @@ -487,6 +509,13 @@ debug@4:
dependencies:
ms "2.1.2"

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@^4.1.0, debug@^4.1.1:
version "4.3.2"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.2.tgz#f0a49c18ac8779e31d4a0c6029dfb76873c7428b"
Expand Down Expand Up @@ -837,7 +866,7 @@ http-proxy-agent@^5.0.0:
agent-base "6"
debug "4"

https-proxy-agent@^5.0.1:
https-proxy-agent@^5.0.0, https-proxy-agent@^5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6"
integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==
Expand Down Expand Up @@ -898,6 +927,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"
Expand Down Expand Up @@ -1114,6 +1148,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, minimatch@^3.0.4:
version "3.0.4"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
Expand All @@ -1126,6 +1169,11 @@ minimist@^1.2.5:
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.7.tgz#daa1c4d91f507390437c6a8bc01078e7000c4d18"
integrity sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==

minimist@^1.2.6:
version "1.2.8"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c"
integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==

minipass@^3.0.0:
version "3.1.3"
resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.1.3.tgz#7d42ff1f39635482e15f9cdb53184deebd5815fd"
Expand Down Expand Up @@ -1153,6 +1201,32 @@ mkdirp@1.0.4, mkdirp@^1.0.3:
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e"
integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==

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"
Expand Down Expand Up @@ -1183,6 +1257,11 @@ mocha@^7.1.1:
yargs-parser "13.1.2"
yargs-unparser "1.6.0"

ms@2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==

ms@2.1.1, ms@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a"
Expand Down Expand Up @@ -1673,6 +1752,11 @@ wrappy@1:
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=

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"
Expand Down
6 changes: 6 additions & 0 deletions scripts/test-extensions-unit.bat
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ if "%INTEGRATION_TEST_ELECTRON_PATH%"=="" (
compile-extension:azurecore^
compile-extension:cms^
compile-extension:dacpac^
compile-extension:datavirtualization^
compile-extension:import^
compile-extension:schema-compare^
compile-extension:machine-learning^
Expand Down Expand Up @@ -86,6 +87,11 @@ echo *** starting dacpac tests ***
echo *****************************
call "%INTEGRATION_TEST_ELECTRON_PATH%" --extensionDevelopmentPath=%~dp0\..\extensions\dacpac --extensionTestsPath=%~dp0\..\extensions\dacpac\out\test %ALL_PLATFORMS_API_TESTS_EXTRA_ARGS%

echo *****************************************
echo *** starting datavirtualization tests ***
echo *****************************************
call "%INTEGRATION_TEST_ELECTRON_PATH%" --extensionDevelopmentPath=%~dp0\..\extensions\datavirtualization --extensionTestsPath=%~dp0\..\extensions\datavirtualization\out\test %ALL_PLATFORMS_API_TESTS_EXTRA_ARGS%

REM {{SQL CARBON TODO}} - follow-up on why this extension test suite is failing
REM echo ********************************************
REM echo *** starting data-workspace tests ***
Expand Down
1 change: 1 addition & 0 deletions scripts/test-extensions-unit.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const extensionList = [
'cms',
'dacpac',
'data-workspace',
'datavirtualization',
'import',
'machine-learning',
//'mssql',
Expand Down
6 changes: 6 additions & 0 deletions scripts/test-extensions-unit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ else
compile-extension:azurecore \
compile-extension:cms \
compile-extension:dacpac \
compile-extension:datavirtualization \
compile-extension:import \
compile-extension:schema-compare \
compile-extension:machine-learning \
Expand Down Expand Up @@ -119,6 +120,11 @@ echo *** starting dacpac tests ***
echo *****************************
"$INTEGRATION_TEST_ELECTRON_PATH" $LINUX_EXTRA_ARGS --extensionDevelopmentPath=$ROOT/extensions/dacpac --extensionTestsPath=$ROOT/extensions/dacpac/out/test $ALL_PLATFORMS_API_TESTS_EXTRA_ARGS

echo *****************************************
echo *** starting datavirtualization tests ***
echo *****************************************
"$INTEGRATION_TEST_ELECTRON_PATH" $LINUX_EXTRA_ARGS --extensionDevelopmentPath=$ROOT/extensions/datavirtualization --extensionTestsPath=$ROOT/extensions/datavirtualization/out/test $ALL_PLATFORMS_API_TESTS_EXTRA_ARGS

# {{SQL CARBON TODO}} - disable tests for this extension
# echo ********************************************
# echo *** starting data-workspace tests ***
Expand Down

0 comments on commit 7bf1111

Please sign in to comment.