mirror of
https://github.com/microsoft/vscode.git
synced 2026-07-07 23:36:03 +01:00
make sure git is activated before integration tests run
This commit is contained in:
@@ -26,6 +26,11 @@
|
||||
},
|
||||
"contributes": {
|
||||
"commands": [
|
||||
{
|
||||
"command": "git.activate",
|
||||
"title": "%command.activate%",
|
||||
"category": "Git"
|
||||
},
|
||||
{
|
||||
"command": "git.setLogLevel",
|
||||
"title": "%command.setLogLevel%",
|
||||
@@ -451,6 +456,10 @@
|
||||
],
|
||||
"menus": {
|
||||
"commandPalette": [
|
||||
{
|
||||
"command": "git.activate",
|
||||
"when": "false"
|
||||
},
|
||||
{
|
||||
"command": "git.clone",
|
||||
"when": "config.git.enabled"
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"displayName": "Git",
|
||||
"description": "Git SCM Integration",
|
||||
"command.activate": "Activate",
|
||||
"command.setLogLevel": "Set Log Level...",
|
||||
"command.clone": "Clone",
|
||||
"command.init": "Initialize Repository",
|
||||
|
||||
@@ -253,6 +253,11 @@ export class CommandCenter {
|
||||
});
|
||||
}
|
||||
|
||||
@command('git.activate')
|
||||
async activate(): Promise<void> {
|
||||
// noop
|
||||
}
|
||||
|
||||
@command('git.setLogLevel')
|
||||
async setLogLevel(): Promise<void> {
|
||||
const createItem = (logLevel: LogLevel) => ({
|
||||
|
||||
@@ -40,6 +40,8 @@ suite('git smoke test', function () {
|
||||
cp.execSync('git add .', { cwd });
|
||||
cp.execSync('git commit -m "initial commit"', { cwd });
|
||||
|
||||
// make sure git is activated
|
||||
await commands.executeCommand('git.activate');
|
||||
git = extensions.getExtension<GitExtension>('vscode.git')!.exports.getAPI(1);
|
||||
|
||||
if (git.repositories.length === 0) {
|
||||
|
||||
Reference in New Issue
Block a user