Skip to content

Commit 06dbb19

Browse files
committed
make sure git is activated before integration tests run
1 parent 69657a7 commit 06dbb19

4 files changed

Lines changed: 17 additions & 0 deletions

File tree

extensions/git/package.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@
2626
},
2727
"contributes": {
2828
"commands": [
29+
{
30+
"command": "git.activate",
31+
"title": "%command.activate%",
32+
"category": "Git"
33+
},
2934
{
3035
"command": "git.setLogLevel",
3136
"title": "%command.setLogLevel%",
@@ -451,6 +456,10 @@
451456
],
452457
"menus": {
453458
"commandPalette": [
459+
{
460+
"command": "git.activate",
461+
"when": "false"
462+
},
454463
{
455464
"command": "git.clone",
456465
"when": "config.git.enabled"

extensions/git/package.nls.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"displayName": "Git",
33
"description": "Git SCM Integration",
4+
"command.activate": "Activate",
45
"command.setLogLevel": "Set Log Level...",
56
"command.clone": "Clone",
67
"command.init": "Initialize Repository",

extensions/git/src/commands.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,11 @@ export class CommandCenter {
253253
});
254254
}
255255

256+
@command('git.activate')
257+
async activate(): Promise<void> {
258+
// noop
259+
}
260+
256261
@command('git.setLogLevel')
257262
async setLogLevel(): Promise<void> {
258263
const createItem = (logLevel: LogLevel) => ({

extensions/git/src/test/smoke.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ suite('git smoke test', function () {
4040
cp.execSync('git add .', { cwd });
4141
cp.execSync('git commit -m "initial commit"', { cwd });
4242

43+
// make sure git is activated
44+
await commands.executeCommand('git.activate');
4345
git = extensions.getExtension<GitExtension>('vscode.git')!.exports.getAPI(1);
4446

4547
if (git.repositories.length === 0) {

0 commit comments

Comments
 (0)