Skip to content

Commit 9348a37

Browse files
authored
Adds missing entries in the unittest ioc container for extract var tests (microsoft#11493)
* Adds missing entries in the unittest ioc container for extract var tests * Use registerInterpreterStorageTypes
1 parent b2053ea commit 9348a37

2 files changed

Lines changed: 12 additions & 8 deletions

File tree

src/test/ciConstants.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ export const PYTHON_VIRTUAL_ENVS_LOCATION = process.env.PYTHON_VIRTUAL_ENVS_LOCA
1010
export const IS_APPVEYOR = process.env.APPVEYOR === 'true';
1111
export const IS_TRAVIS = process.env.TRAVIS === 'true';
1212
export const IS_VSTS = process.env.TF_BUILD !== undefined;
13-
export const IS_CI_SERVER = IS_TRAVIS || IS_APPVEYOR || IS_VSTS;
13+
export const IS_GITHUB_ACTIONS = process.env.GITHUB_ACTIONS === 'true';
14+
export const IS_CI_SERVER = IS_TRAVIS || IS_APPVEYOR || IS_VSTS || IS_GITHUB_ACTIONS;
1415

1516
// Control JUnit-style output logging for reporting purposes.
1617
let reportJunit: boolean = false;

src/test/refactor/extension.refactor.extract.var.test.ts

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ suite('Variable Extraction', () => {
8989
ioc.registerCommonTypes();
9090
ioc.registerProcessTypes();
9191
ioc.registerVariableTypes();
92+
ioc.registerInterpreterStorageTypes();
9293
ioc.registerMockInterpreterTypes();
9394

9495
ioc.serviceManager.addSingleton<ICondaService>(ICondaService, CondaService);
@@ -192,13 +193,15 @@ suite('Variable Extraction', () => {
192193
}
193194

194195
// This test fails on linux (text document not getting updated in time)
195-
if (!IS_CI_SERVER) {
196-
test('Extract Variable (end to end)', async () => {
197-
const startPos = new Position(234, 29);
198-
const endPos = new Position(234, 38);
199-
await testingVariableExtractionEndToEnd(false, startPos, endPos);
200-
});
201-
}
196+
test('Extract Variable (end to end)', async function () {
197+
if (!IS_CI_SERVER) {
198+
// tslint:disable-next-line:no-invalid-this
199+
return this.skip();
200+
}
201+
const startPos = new Position(234, 29);
202+
const endPos = new Position(234, 38);
203+
await testingVariableExtractionEndToEnd(false, startPos, endPos);
204+
});
202205

203206
test('Extract Variable fails if whole string not selected (end to end)', async () => {
204207
const startPos = new Position(234, 20);

0 commit comments

Comments
 (0)