mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-25 14:20:30 -04:00
Vscode merge (#4582)
* Merge from vscode 37cb23d3dd4f9433d56d4ba5ea3203580719a0bd * fix issues with merges * bump node version in azpipe * replace license headers * remove duplicate launch task * fix build errors * fix build errors * fix tslint issues * working through package and linux build issues * more work * wip * fix packaged builds * working through linux build errors * wip * wip * wip * fix mac and linux file limits * iterate linux pipeline * disable editor typing * revert series to parallel * remove optimize vscode from linux * fix linting issues * revert testing change * add work round for new node * readd packaging for extensions * fix issue with angular not resolving decorator dependencies
This commit is contained in:
@@ -22,9 +22,9 @@ import { TestConnectionManagementService } from 'sqltest/stubs/connectionManagem
|
||||
import { ICommandService } from 'vs/platform/commands/common/commands';
|
||||
import { TestCommandService } from 'vs/editor/test/browser/editorTestServices';
|
||||
import { WorkspaceConfigurationTestService } from 'sqltest/stubs/workspaceConfigurationTestService';
|
||||
import { IWorkspaceConfigurationService } from 'vs/workbench/services/configuration/common/configuration';
|
||||
import { IConnectionProfile } from 'sql/platform/connection/common/interfaces';
|
||||
import { assertThrowsAsync } from 'sqltest/utils/testUtils';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
|
||||
class TestParsedArgs implements ParsedArgs {
|
||||
[arg: string]: any;
|
||||
@@ -63,7 +63,7 @@ class TestParsedArgs implements ParsedArgs {
|
||||
locale?: string;
|
||||
log?: string;
|
||||
logExtensionHostCommunication?: boolean;
|
||||
'max-memory'?: number;
|
||||
'max-memory'?: string;
|
||||
'new-window'?: boolean;
|
||||
'open-url'?: boolean;
|
||||
performance?: boolean;
|
||||
@@ -104,7 +104,7 @@ suite('commandLineService tests', () => {
|
||||
});
|
||||
|
||||
function getCommandLineService(connectionManagementService: IConnectionManagementService,
|
||||
configurationService: IWorkspaceConfigurationService,
|
||||
configurationService: IConfigurationService,
|
||||
capabilitiesService?: ICapabilitiesService,
|
||||
commandService?: ICommandService
|
||||
): CommandLineService {
|
||||
@@ -121,8 +121,8 @@ suite('commandLineService tests', () => {
|
||||
return service;
|
||||
}
|
||||
|
||||
function getConfigurationServiceMock(showConnectDialogOnStartup: boolean): TypeMoq.Mock<IWorkspaceConfigurationService> {
|
||||
let configurationService = TypeMoq.Mock.ofType<IWorkspaceConfigurationService>(WorkspaceConfigurationTestService);
|
||||
function getConfigurationServiceMock(showConnectDialogOnStartup: boolean): TypeMoq.Mock<IConfigurationService> {
|
||||
let configurationService = TypeMoq.Mock.ofType<IConfigurationService>(WorkspaceConfigurationTestService);
|
||||
configurationService.setup((c) => c.getValue(TypeMoq.It.isAnyString())).returns((config: string) => showConnectDialogOnStartup);
|
||||
return configurationService;
|
||||
}
|
||||
@@ -283,4 +283,3 @@ suite('commandLineService tests', () => {
|
||||
assertThrowsAsync(async () => await service.processCommandLine(args));
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@ import { IConnectionProfile, IConnectionProfileStore } from 'sql/platform/connec
|
||||
import { ConnectionProfile } from 'sql/platform/connection/common/connectionProfile';
|
||||
import { ConfigurationTarget } from 'vs/platform/configuration/common/configuration';
|
||||
import { WorkspaceConfigurationTestService } from 'sqltest/stubs/workspaceConfigurationTestService';
|
||||
import { IConfigurationValue, ConfigurationEditingService } from 'vs/workbench/services/configuration/node/configurationEditingService';
|
||||
import * as Constants from 'sql/platform/connection/common/constants';
|
||||
import { IConnectionProfileGroup, ConnectionProfileGroup } from 'sql/platform/connection/common/connectionProfileGroup';
|
||||
import * as assert from 'assert';
|
||||
@@ -21,6 +20,7 @@ import * as azdata from 'azdata';
|
||||
import { Emitter } from 'vs/base/common/event';
|
||||
import { ConnectionOptionSpecialType, ServiceOptionType } from 'sql/workbench/api/common/sqlExtHostTypes';
|
||||
import { CapabilitiesTestService } from 'sqltest/stubs/capabilitiesTestService';
|
||||
import { ConfigurationEditingService, IConfigurationValue } from 'vs/workbench/services/configuration/common/configurationEditingService';
|
||||
|
||||
suite('SQL ConnectionConfig tests', () => {
|
||||
let capabilitiesService: TypeMoq.Mock<ICapabilitiesService>;
|
||||
@@ -952,4 +952,3 @@ suite('SQL ConnectionConfig tests', () => {
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
@@ -122,14 +122,14 @@ suite('SQL QueryEditor Tests', () => {
|
||||
// Create a QueryInput
|
||||
let filePath = 'file://someFile.sql';
|
||||
let uri: URI = URI.parse(filePath);
|
||||
let fileInput = new UntitledEditorInput(uri, false, '', '', '', instantiationService.object, undefined, undefined, undefined);
|
||||
let fileInput = new UntitledEditorInput(uri, false, '', '', '', instantiationService.object, undefined, undefined);
|
||||
let queryResultsInput: QueryResultsInput = new QueryResultsInput(uri.fsPath, configurationService.object);
|
||||
queryInput = new QueryInput('first', fileInput, queryResultsInput, undefined, undefined, undefined, undefined, undefined);
|
||||
|
||||
// Create a QueryInput to compare to the previous one
|
||||
let filePath2 = 'file://someFile2.sql';
|
||||
let uri2: URI = URI.parse(filePath2);
|
||||
let fileInput2 = new UntitledEditorInput(uri2, false, '', '', '', instantiationService.object, undefined, undefined, undefined);
|
||||
let fileInput2 = new UntitledEditorInput(uri2, false, '', '', '', instantiationService.object, undefined, undefined);
|
||||
let queryResultsInput2: QueryResultsInput = new QueryResultsInput(uri2.fsPath, configurationService.object);
|
||||
queryInput2 = new QueryInput('second', fileInput2, queryResultsInput2, undefined, undefined, undefined, undefined, undefined);
|
||||
|
||||
@@ -357,7 +357,7 @@ suite('SQL QueryEditor Tests', () => {
|
||||
return new RunQueryAction(undefined, undefined, undefined);
|
||||
});
|
||||
|
||||
let fileInput = new UntitledEditorInput(URI.parse('file://testUri'), false, '', '', '', instantiationService.object, undefined, undefined, undefined);
|
||||
let fileInput = new UntitledEditorInput(URI.parse('file://testUri'), false, '', '', '', instantiationService.object, undefined, undefined);
|
||||
queryModelService = TypeMoq.Mock.ofType(QueryModelService, TypeMoq.MockBehavior.Loose, undefined, undefined);
|
||||
queryModelService.callBase = true;
|
||||
queryModelService.setup(x => x.disposeQuery(TypeMoq.It.isAny())).returns(() => void 0);
|
||||
|
||||
@@ -7,12 +7,26 @@
|
||||
|
||||
import { ServiceIdentifier, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { Event } from 'vs/base/common/event';
|
||||
import { IEditorGroupsService, GroupOrientation, IEditorGroup, GroupDirection, GroupsArrangement, IMoveEditorOptions, GroupsOrder, EditorGroupLayout, IFindGroupScope, IAddGroupOptions, IMergeGroupOptions } from 'vs/workbench/services/group/common/editorGroupsService';
|
||||
import { IEditorOpeningEvent } from 'vs/workbench/browser/parts/editor/editor';
|
||||
import { IEditorInput, EditorInput, GroupIdentifier } from 'vs/workbench/common/editor';
|
||||
import { IEditorInput, EditorInput, GroupIdentifier, IEditorPartOptions } from 'vs/workbench/common/editor';
|
||||
import { EditorGroup } from 'vs/workbench/common/editor/editorGroup';
|
||||
import { IEditorGroupsService, IFindGroupScope, IEditorGroup, GroupDirection, IAddGroupOptions, IMergeGroupOptions, GroupOrientation, GroupsOrder, GroupsArrangement, IMoveEditorOptions, EditorGroupLayout } from 'vs/workbench/services/editor/common/editorGroupsService';
|
||||
import { IDimension } from 'vs/editor/common/editorCommon';
|
||||
import { IDisposable } from 'vs/base/common/lifecycle';
|
||||
|
||||
export class EditorGroupTestService implements IEditorGroupsService {
|
||||
dimension: IDimension;
|
||||
whenRestored: Promise<void>;
|
||||
centerLayout(active: boolean): void {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
isLayoutCentered(): boolean {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
partOptions: IEditorPartOptions;
|
||||
enforcePartOptions(options: IEditorPartOptions): IDisposable {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
_serviceBrand: ServiceIdentifier<any>;
|
||||
|
||||
findGroup(scope: IFindGroupScope, source?: IEditorGroup | GroupIdentifier, wrap?: boolean): IEditorGroup {
|
||||
@@ -43,12 +57,16 @@ export class EditorGroupTestService implements IEditorGroupsService {
|
||||
|
||||
onEditorGroupMoved: Event<void>;
|
||||
|
||||
onDidLayout: Event<IDimension>;
|
||||
|
||||
/**
|
||||
* An event for when the active editor group changes. The active editor
|
||||
* group is the default location for new editors to open.
|
||||
*/
|
||||
readonly onDidActiveGroupChange: Event<IEditorGroup>;
|
||||
|
||||
onDidActivateGroup: Event<IEditorGroup>;
|
||||
|
||||
/**
|
||||
* An event for when a new group was added.
|
||||
*/
|
||||
@@ -214,4 +232,4 @@ export class EditorGroupTestService implements IEditorGroupsService {
|
||||
applyLayout(layout: EditorGroupLayout): void {
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,6 +65,12 @@ export class StorageTestService implements IStorageService {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
getNumber(key: string, scope: StorageScope, fallbackValue: number): number;
|
||||
getNumber(key: string, scope: StorageScope, fallbackValue?: number): number;
|
||||
getNumber(key: any, scope: any, fallbackValue?: any): number {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve an element stored with the given key from local storage. Use
|
||||
* the provided defaultValue if the element is null or undefined. The element
|
||||
@@ -86,4 +92,4 @@ export class StorageTestService implements IStorageService {
|
||||
getBoolean(key: string, scope?: StorageScope, defaultValue?: boolean): boolean {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,9 +9,9 @@ import { IEditorOptions, IResourceInput, ITextEditorOptions } from 'vs/platform
|
||||
import { IEditor, IEditorInput, IResourceDiffInput, IResourceSideBySideInput, GroupIdentifier, ITextEditor, IUntitledResourceInput, ITextDiffEditor, ITextSideBySideEditor, IEditorInputWithOptions } from 'vs/workbench/common/editor';
|
||||
import { Event } from 'vs/base/common/event';
|
||||
import { Position } from 'vs/editor/common/core/position';
|
||||
import { IEditorGroup, IEditorReplacement } from 'vs/workbench/services/group/common/editorGroupsService';
|
||||
import { ICodeEditor } from 'vs/editor/browser/editorBrowser';
|
||||
import { IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { IEditorGroup, IEditorReplacement } from 'vs/workbench/services/editor/common/editorGroupsService';
|
||||
|
||||
export class WorkbenchEditorTestService implements IEditorService {
|
||||
_serviceBrand: ServiceIdentifier<any>;
|
||||
@@ -109,4 +109,4 @@ export class WorkbenchEditorTestService implements IEditorService {
|
||||
getOpened(editor: IResourceInput | IUntitledResourceInput, group?: IEditorGroup | GroupIdentifier): IEditorInput {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,13 +4,12 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
'use strict';
|
||||
|
||||
import { IWorkspaceConfigurationService } from 'vs/workbench/services/configuration/common/configuration';
|
||||
import { IConfigurationData, IConfigurationOverrides, ConfigurationTarget, IConfigurationChangeEvent } from 'vs/platform/configuration/common/configuration';
|
||||
import { IConfigurationData, IConfigurationOverrides, ConfigurationTarget, IConfigurationChangeEvent, IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
|
||||
import { Event } from 'vs/base/common/event';
|
||||
import { IWorkspaceFolder } from 'vs/platform/workspace/common/workspace';
|
||||
|
||||
export class WorkspaceConfigurationTestService implements IWorkspaceConfigurationService {
|
||||
export class WorkspaceConfigurationTestService implements IConfigurationService {
|
||||
_serviceBrand: any;
|
||||
|
||||
getValue<T>(): T;
|
||||
|
||||
@@ -77,7 +77,7 @@ suite('TaskUtilities', function () {
|
||||
|
||||
// Mock the workbench service to return the active tab connection
|
||||
let tabConnectionUri = 'file://test_uri';
|
||||
let editorInput = new UntitledEditorInput(URI.parse(tabConnectionUri), false, undefined, undefined, undefined, undefined, undefined, undefined, undefined);
|
||||
let editorInput = new UntitledEditorInput(URI.parse(tabConnectionUri), false, undefined, undefined, undefined, undefined, undefined, undefined);
|
||||
let queryInput = new QueryInput(undefined, editorInput, undefined, undefined, undefined, undefined, undefined, undefined);
|
||||
mockConnectionManagementService.setup(x => x.getConnectionProfile(tabConnectionUri)).returns(() => tabProfile);
|
||||
|
||||
@@ -106,4 +106,4 @@ suite('TaskUtilities', function () {
|
||||
let actualProfile = TaskUtilities.getCurrentGlobalConnection(mockObjectExplorerService.object, mockConnectionManagementService.object, mockWorkbenchEditorService.object);
|
||||
assert.equal(actualProfile, oeProfile);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user