Skip to content

Commit ba90733

Browse files
authored
Run tests against insiders (#9919)
* We have code in extension that displays a dialog (preventing extension from loading) in insiders version of VSC. * Run tests against insiders * Restore env variable
1 parent 7d22caa commit ba90733

File tree

4 files changed

+12
-3
lines changed

4 files changed

+12
-3
lines changed

src/test/common/insidersBuild/insidersExtensionService.unit.test.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,10 @@ suite('Insiders Extension Service - Activation', () => {
9999
let handleEdgeCases: sinon.SinonStub<any>;
100100
let insidersInstaller: IExtensionBuildInstaller;
101101
let insidersExtensionService: InsidersExtensionService;
102+
let envUITEST_DISABLE_INSIDERSExists = false;
102103
setup(() => {
104+
envUITEST_DISABLE_INSIDERSExists = process.env.UITEST_DISABLE_INSIDERS !== undefined;
105+
delete process.env.UITEST_DISABLE_INSIDERS;
103106
extensionChannelService = mock(ExtensionChannelService);
104107
insidersInstaller = mock(InsidersBuildInstaller);
105108
appEnvironment = mock(ApplicationEnvironment);
@@ -112,6 +115,9 @@ suite('Insiders Extension Service - Activation', () => {
112115
});
113116

114117
teardown(() => {
118+
if (envUITEST_DISABLE_INSIDERSExists) {
119+
process.env.UITEST_DISABLE_INSIDERS = '1';
120+
}
115121
sinon.restore();
116122
});
117123

src/test/debuggerTest.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ function start() {
1818
extensionDevelopmentPath: EXTENSION_ROOT_DIR_FOR_TESTS,
1919
extensionTestsPath: path.join(EXTENSION_ROOT_DIR_FOR_TESTS, 'out', 'test', 'index'),
2020
launchArgs: [workspacePath],
21-
version: 'stable'
21+
version: 'insiders',
22+
extensionTestsEnv: { ...process.env, UITEST_DISABLE_INSIDERS: '1' }
2223
}).catch(ex => {
2324
console.error('End Debugger tests (with errors)', ex);
2425
process.exit(1);

src/test/multiRootTest.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ function start() {
1414
extensionDevelopmentPath: EXTENSION_ROOT_DIR_FOR_TESTS,
1515
extensionTestsPath: path.join(EXTENSION_ROOT_DIR_FOR_TESTS, 'out', 'test', 'index'),
1616
launchArgs: [workspacePath, '--enable-proposed-api', 'ms-python.python'],
17-
version: 'insiders'
17+
version: 'insiders',
18+
extensionTestsEnv: { ...process.env, UITEST_DISABLE_INSIDERS: '1' }
1819
}).catch(ex => {
1920
console.error('End Multiroot tests (with errors)', ex);
2021
process.exit(1);

src/test/standardTest.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ function start() {
1616
extensionDevelopmentPath: extensionDevelopmentPath,
1717
extensionTestsPath: path.join(EXTENSION_ROOT_DIR_FOR_TESTS, 'out', 'test', 'index'),
1818
launchArgs: [workspacePath, '--enable-proposed-api', 'ms-python.python'],
19-
version: 'insiders'
19+
version: 'insiders',
20+
extensionTestsEnv: { ...process.env, UITEST_DISABLE_INSIDERS: '1' }
2021
}).catch(ex => {
2122
console.error('End Standard tests (with errors)', ex);
2223
process.exit(1);

0 commit comments

Comments
 (0)