Skip to content

Commit ed72684

Browse files
dkwon17fbricon
authored andcommitted
Use staging URL for project generation tests
Signed-off-by: David Kwon <[email protected]>
1 parent 9228fa0 commit ed72684

File tree

4 files changed

+14
-3
lines changed

4 files changed

+14
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@
342342
"build-server": "./node_modules/.bin/gulp buildServer",
343343
"build-ext": "./node_modules/.bin/gulp buildExtension",
344344
"test-ui": "npm run test-compile && npm run test-ui-run",
345-
"test-ui-run": "extest setup-and-run 'out/test/vscodeUiTest/suite/*.js' -u",
345+
"test-ui-run": "extest setup-and-run 'out/test/vscodeUiTest/suite/*.js' -u -c 1.42.1",
346346
"test-all": "npm test && npm run test-ui-run"
347347
},
348348
"devDependencies": {

src/QuarkusConfig.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ export namespace QuarkusConfig {
3232
export const DEBUG_TERMINATE_ON_EXIT = 'quarkus.tools.debug.terminateProcessOnExit';
3333

3434
export function getApiUrl(): string {
35+
if (process.env.VSCODE_QUARKUS_API_URL) {
36+
return process.env.VSCODE_QUARKUS_API_URL;
37+
}
3538
return workspace.getConfiguration().get<string>(STARTER_API, DEFAULT_API_URL);
3639
}
3740

src/test/vscodeUiTest/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@
1616
import { ExTester } from 'vscode-extension-tester';
1717

1818
const tester: ExTester = new ExTester();
19-
tester.setupAndRunTests(undefined, undefined, 'out/test/vscodeUiTest/suite/*.js');
19+
tester.setupAndRunTests(undefined, undefined, 'out/test/vscodeUiTest/suite/*.js');

src/test/vscodeUiTest/suite/projectGenerationTest.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,21 @@ use(require('chai-fs'));
3131
*/
3232
describe('Project generation tests', function() {
3333
this.bail(true);
34+
this.retries(3);
3435

3536
let driver: WebDriver;
3637
const tempDir: string = path.join(__dirname, 'temp');
3738

39+
process.env['VSCODE_QUARKUS_API_URL'] = 'https://stage.code.quarkus.io/api';
40+
3841
before(() => {
3942
driver = VSBrowser.instance.driver;
40-
fs.removeSync(tempDir);
43+
});
44+
45+
beforeEach(() => {
46+
if (fs.existsSync(tempDir)) {
47+
fs.removeSync(tempDir);
48+
}
4149
fs.mkdirSync(tempDir);
4250
});
4351

0 commit comments

Comments
 (0)