Reenable extension unit tests (#23497)

* Reenable extension unit tests

* Turn off Notebook Trust test cases

* Skip another failing notebook trust test

* Limit scope of disabled tests to only folder scenarios
This commit is contained in:
Karl Burtram
2023-06-29 00:23:08 -07:00
committed by GitHub
parent 40fa1cebd8
commit 737b6ec726
3 changed files with 44 additions and 46 deletions

View File

@@ -136,50 +136,48 @@ steps:
displayName: Run core integration tests displayName: Run core integration tests
condition: and(succeeded(), eq(variables['RUN_TESTS'], 'true'), ne(variables['EXTENSIONS_ONLY'], 'true')) condition: and(succeeded(), eq(variables['RUN_TESTS'], 'true'), ne(variables['EXTENSIONS_ONLY'], 'true'))
# {{SQL CARBON TODO}} - disable extension unit tests while investigating post merge (6/26/2023) - script: |
# - script: | # Figure out the full absolute path of the product we just built
# # Figure out the full absolute path of the product we just built # including the remote server and configure the unit tests
# # including the remote server and configure the unit tests # to run with these builds instead of running out of sources.
# # to run with these builds instead of running out of sources. set -e
# set -e APP_ROOT=$(agent.builddirectory)/azuredatastudio-linux-x64
# APP_ROOT=$(agent.builddirectory)/azuredatastudio-linux-x64 APP_NAME=$(node -p "require(\"$APP_ROOT/resources/app/product.json\").applicationName")
# APP_NAME=$(node -p "require(\"$APP_ROOT/resources/app/product.json\").applicationName") INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME" \
# INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME" \ NO_CLEANUP=1 \
# NO_CLEANUP=1 \ VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/azuredatastudio-reh-linux-x64" \
# VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/azuredatastudio-reh-linux-x64" \ DISPLAY=:10 ./scripts/test-extensions-unit.sh --build --tfs "Extension Unit Tests"
# DISPLAY=:10 ./scripts/test-extensions-unit.sh --build --tfs "Extension Unit Tests" displayName: Run Extension Unit Tests (Continue on Error)
# displayName: Run Extension Unit Tests (Continue on Error) continueOnError: true
# continueOnError: true condition: and(succeeded(), and(eq(variables['RUN_TESTS'], 'true'), eq(variables['EXTENSION_UNIT_TESTS_FAIL_ON_ERROR'], 'false')))
# condition: and(succeeded(), and(eq(variables['RUN_TESTS'], 'true'), eq(variables['EXTENSION_UNIT_TESTS_FAIL_ON_ERROR'], 'false')))
# - script: | - script: |
# # Figure out the full absolute path of the product we just built # Figure out the full absolute path of the product we just built
# # including the remote server and configure the unit tests # including the remote server and configure the unit tests
# # to run with these builds instead of running out of sources. # to run with these builds instead of running out of sources.
# set -e set -e
# APP_ROOT=$(agent.builddirectory)/azuredatastudio-linux-x64 APP_ROOT=$(agent.builddirectory)/azuredatastudio-linux-x64
# APP_NAME=$(node -p "require(\"$APP_ROOT/resources/app/product.json\").applicationName") APP_NAME=$(node -p "require(\"$APP_ROOT/resources/app/product.json\").applicationName")
# INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME" \ INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME" \
# NO_CLEANUP=1 \ NO_CLEANUP=1 \
# VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/azuredatastudio-reh-linux-x64" \ VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/azuredatastudio-reh-linux-x64" \
# DISPLAY=:10 ./scripts/test-extensions-unit.sh --build --tfs "Extension Unit Tests" DISPLAY=:10 ./scripts/test-extensions-unit.sh --build --tfs "Extension Unit Tests"
# displayName: Run Extension Unit Tests (Fail on Error) displayName: Run Extension Unit Tests (Fail on Error)
# condition: and(succeeded(), and(eq(variables['RUN_TESTS'], 'true'), ne(variables['EXTENSION_UNIT_TESTS_FAIL_ON_ERROR'], 'false'))) condition: and(succeeded(), and(eq(variables['RUN_TESTS'], 'true'), ne(variables['EXTENSION_UNIT_TESTS_FAIL_ON_ERROR'], 'false')))
# - bash: | - bash: |
# set -e set -e
# mkdir -p $(Build.ArtifactStagingDirectory)/logs/linux-x64 mkdir -p $(Build.ArtifactStagingDirectory)/logs/linux-x64
# cd /tmp cd /tmp
# for folder in adsuser*/ for folder in adsuser*/
# do do
# folder=${folder%/} folder=${folder%/}
# # Only archive directories we want for debugging purposes # Only archive directories we want for debugging purposes
# tar -czvf $(Build.ArtifactStagingDirectory)/logs/linux-x64/$folder.tar.gz $folder/User $folder/logs tar -czvf $(Build.ArtifactStagingDirectory)/logs/linux-x64/$folder.tar.gz $folder/User $folder/logs
# done done
# displayName: Archive Logs displayName: Archive Logs
# continueOnError: true continueOnError: true
# condition: and(succeeded(), eq(variables['RUN_TESTS'], 'true')) condition: and(succeeded(), eq(variables['RUN_TESTS'], 'true'))
# {{SQL CARBON TODO}} - end disable extension unit tests while investigating post merge (6/26/2023)
- script: | - script: |
set -e set -e

View File

@@ -210,7 +210,8 @@ describe('BooksTreeViewTests', function () {
equalBookItems(notebook3, expectedNotebook3); equalBookItems(notebook3, expectedNotebook3);
}); });
it('should set notebooks trusted to true on trustBook', async () => { // {{SQL CARBON TODO}} - disable failing test
it.skip('should set notebooks trusted to true on trustBook', async () => {
let notebook1Path = notebook1.tooltip; let notebook1Path = notebook1.tooltip;
let bookTrustManager: BookTrustManager = new BookTrustManager(bookTreeViewProvider.books); let bookTrustManager: BookTrustManager = new BookTrustManager(bookTreeViewProvider.books);
let isTrusted = bookTrustManager.isNotebookTrustedByDefault(notebook1Path); let isTrusted = bookTrustManager.isNotebookTrustedByDefault(notebook1Path);

View File

@@ -222,9 +222,8 @@ describe('BookTrustManagerTests', function () {
}); });
}); });
// {{SQL CARBON TODO}} - reenable this test suite https://github.com/microsoft/azuredatastudio/issues/23540
describe.skip('TrustingInFolder', () => {
describe('TrustingInFolder', () => {
let bookTrustManager: IBookTrustManager; let bookTrustManager: IBookTrustManager;
let books: BookModel[]; let books: BookModel[];