mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Refact/idea lastknown (#501)
* close * connection is working * formatting * adds all * formatting * removed unneeded logging * readd npm shrinkwrap * addressed comments * fix capabilities cacheing * updated shrinkwrap * fixed tests * remove dead code * vbump sqltools
This commit is contained in:
@@ -5,12 +5,12 @@
|
||||
|
||||
'use strict';
|
||||
import * as OptionsDialogHelper from 'sql/base/browser/ui/modal/optionsDialogHelper';
|
||||
import { ServiceOptionType } from 'sql/parts/connection/common/connectionManagement';
|
||||
import { InputBox } from 'vs/base/browser/ui/inputbox/inputBox';
|
||||
import data = require('data');
|
||||
import { Builder, $ } from 'vs/base/browser/builder';
|
||||
import * as TypeMoq from 'typemoq';
|
||||
import * as assert from 'assert';
|
||||
import { ServiceOptionType } from 'sql/workbench/api/common/sqlExtHostTypes';
|
||||
|
||||
suite('Advanced options helper tests', () => {
|
||||
var possibleInputs: string[];
|
||||
|
||||
@@ -10,6 +10,7 @@ import { ConnectionProfile } from 'sql/parts/connection/common/connectionProfile
|
||||
import { IConnectionProfile, IConnectionProfileStore } from 'sql/parts/connection/common/interfaces';
|
||||
import data = require('data');
|
||||
import * as assert from 'assert';
|
||||
import { ConnectionOptionSpecialType } from 'sql/workbench/api/common/sqlExtHostTypes';
|
||||
|
||||
suite('SQL ConnectionProfileInfo tests', () => {
|
||||
let msSQLCapabilities: data.DataProtocolServerCapabilities;
|
||||
@@ -58,7 +59,7 @@ suite('SQL ConnectionProfileInfo tests', () => {
|
||||
defaultValue: undefined,
|
||||
isIdentity: true,
|
||||
isRequired: true,
|
||||
specialValueType: 0,
|
||||
specialValueType: ConnectionOptionSpecialType.serverName,
|
||||
valueType: 0
|
||||
},
|
||||
{
|
||||
@@ -70,7 +71,7 @@ suite('SQL ConnectionProfileInfo tests', () => {
|
||||
defaultValue: undefined,
|
||||
isIdentity: true,
|
||||
isRequired: true,
|
||||
specialValueType: 1,
|
||||
specialValueType: ConnectionOptionSpecialType.databaseName,
|
||||
valueType: 0
|
||||
},
|
||||
{
|
||||
@@ -82,7 +83,7 @@ suite('SQL ConnectionProfileInfo tests', () => {
|
||||
defaultValue: undefined,
|
||||
isIdentity: true,
|
||||
isRequired: true,
|
||||
specialValueType: 3,
|
||||
specialValueType: ConnectionOptionSpecialType.userName,
|
||||
valueType: 0
|
||||
},
|
||||
{
|
||||
@@ -94,7 +95,7 @@ suite('SQL ConnectionProfileInfo tests', () => {
|
||||
defaultValue: undefined,
|
||||
isIdentity: true,
|
||||
isRequired: true,
|
||||
specialValueType: 2,
|
||||
specialValueType: ConnectionOptionSpecialType.authType,
|
||||
valueType: 0
|
||||
},
|
||||
{
|
||||
@@ -106,7 +107,7 @@ suite('SQL ConnectionProfileInfo tests', () => {
|
||||
defaultValue: undefined,
|
||||
isIdentity: true,
|
||||
isRequired: true,
|
||||
specialValueType: 4,
|
||||
specialValueType: ConnectionOptionSpecialType.password,
|
||||
valueType: 0
|
||||
}
|
||||
]
|
||||
|
||||
@@ -19,6 +19,7 @@ import * as data from 'data';
|
||||
import { ConnectionProfile } from 'sql/parts/connection/common/connectionProfile';
|
||||
import { Emitter } from 'vs/base/common/event';
|
||||
import { ConnectionProfileGroup, IConnectionProfileGroup } from 'sql/parts/connection/common/connectionProfileGroup';
|
||||
import { ConnectionOptionSpecialType } from 'sql/workbench/api/common/sqlExtHostTypes';
|
||||
|
||||
suite('SQL ConnectionStore tests', () => {
|
||||
let defaultNamedProfile: IConnectionProfile;
|
||||
@@ -108,7 +109,7 @@ suite('SQL ConnectionStore tests', () => {
|
||||
defaultValue: undefined,
|
||||
isIdentity: true,
|
||||
isRequired: true,
|
||||
specialValueType: 0,
|
||||
specialValueType: ConnectionOptionSpecialType.serverName,
|
||||
valueType: 0
|
||||
},
|
||||
{
|
||||
@@ -120,7 +121,7 @@ suite('SQL ConnectionStore tests', () => {
|
||||
defaultValue: undefined,
|
||||
isIdentity: true,
|
||||
isRequired: true,
|
||||
specialValueType: 1,
|
||||
specialValueType: ConnectionOptionSpecialType.databaseName,
|
||||
valueType: 0
|
||||
},
|
||||
{
|
||||
@@ -132,7 +133,7 @@ suite('SQL ConnectionStore tests', () => {
|
||||
defaultValue: undefined,
|
||||
isIdentity: true,
|
||||
isRequired: true,
|
||||
specialValueType: 3,
|
||||
specialValueType: ConnectionOptionSpecialType.userName,
|
||||
valueType: 0
|
||||
},
|
||||
{
|
||||
@@ -144,7 +145,7 @@ suite('SQL ConnectionStore tests', () => {
|
||||
defaultValue: undefined,
|
||||
isIdentity: true,
|
||||
isRequired: true,
|
||||
specialValueType: 2,
|
||||
specialValueType: ConnectionOptionSpecialType.authType,
|
||||
valueType: 0
|
||||
},
|
||||
{
|
||||
@@ -156,7 +157,7 @@ suite('SQL ConnectionStore tests', () => {
|
||||
defaultValue: undefined,
|
||||
isIdentity: true,
|
||||
isRequired: true,
|
||||
specialValueType: 4,
|
||||
specialValueType: ConnectionOptionSpecialType.password,
|
||||
valueType: 0
|
||||
}
|
||||
]
|
||||
|
||||
@@ -16,6 +16,7 @@ import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import * as data from 'data';
|
||||
import * as TypeMoq from 'typemoq';
|
||||
import * as assert from 'assert';
|
||||
import { ConnectionOptionSpecialType } from 'sql/workbench/api/common/sqlExtHostTypes';
|
||||
|
||||
suite('SQL Object Explorer Service tests', () => {
|
||||
var sqlOEProvider: TypeMoq.Mock<ObjectExplorerProviderTestService>;
|
||||
@@ -135,7 +136,7 @@ suite('SQL Object Explorer Service tests', () => {
|
||||
defaultValue: undefined,
|
||||
isIdentity: true,
|
||||
isRequired: true,
|
||||
specialValueType: 0,
|
||||
specialValueType: ConnectionOptionSpecialType.serverName,
|
||||
valueType: 0
|
||||
},
|
||||
{
|
||||
@@ -147,7 +148,7 @@ suite('SQL Object Explorer Service tests', () => {
|
||||
defaultValue: undefined,
|
||||
isIdentity: true,
|
||||
isRequired: true,
|
||||
specialValueType: 1,
|
||||
specialValueType: ConnectionOptionSpecialType.databaseName,
|
||||
valueType: 0
|
||||
},
|
||||
{
|
||||
@@ -159,7 +160,7 @@ suite('SQL Object Explorer Service tests', () => {
|
||||
defaultValue: undefined,
|
||||
isIdentity: true,
|
||||
isRequired: true,
|
||||
specialValueType: 3,
|
||||
specialValueType: ConnectionOptionSpecialType.userName,
|
||||
valueType: 0
|
||||
},
|
||||
{
|
||||
@@ -171,7 +172,7 @@ suite('SQL Object Explorer Service tests', () => {
|
||||
defaultValue: undefined,
|
||||
isIdentity: true,
|
||||
isRequired: true,
|
||||
specialValueType: 2,
|
||||
specialValueType: ConnectionOptionSpecialType.authType,
|
||||
valueType: 0
|
||||
},
|
||||
{
|
||||
@@ -183,7 +184,7 @@ suite('SQL Object Explorer Service tests', () => {
|
||||
defaultValue: undefined,
|
||||
isIdentity: true,
|
||||
isRequired: true,
|
||||
specialValueType: 4,
|
||||
specialValueType: ConnectionOptionSpecialType.password,
|
||||
valueType: 0
|
||||
},
|
||||
{
|
||||
|
||||
@@ -10,6 +10,7 @@ import { ProviderConnectionInfo } from 'sql/parts/connection/common/providerConn
|
||||
import { IConnectionProfile } from 'sql/parts/connection/common/interfaces';
|
||||
import data = require('data');
|
||||
import * as assert from 'assert';
|
||||
import { ConnectionOptionSpecialType } from 'sql/workbench/api/common/sqlExtHostTypes';
|
||||
|
||||
suite('SQL ProviderConnectionInfo tests', () => {
|
||||
let msSQLCapabilities: data.DataProtocolServerCapabilities;
|
||||
@@ -44,7 +45,7 @@ suite('SQL ProviderConnectionInfo tests', () => {
|
||||
defaultValue: undefined,
|
||||
isIdentity: true,
|
||||
isRequired: true,
|
||||
specialValueType: 0,
|
||||
specialValueType: ConnectionOptionSpecialType.serverName,
|
||||
valueType: 0
|
||||
},
|
||||
{
|
||||
@@ -56,7 +57,7 @@ suite('SQL ProviderConnectionInfo tests', () => {
|
||||
defaultValue: undefined,
|
||||
isIdentity: true,
|
||||
isRequired: true,
|
||||
specialValueType: 1,
|
||||
specialValueType: ConnectionOptionSpecialType.databaseName,
|
||||
valueType: 0
|
||||
},
|
||||
{
|
||||
@@ -68,7 +69,7 @@ suite('SQL ProviderConnectionInfo tests', () => {
|
||||
defaultValue: undefined,
|
||||
isIdentity: true,
|
||||
isRequired: true,
|
||||
specialValueType: 3,
|
||||
specialValueType: ConnectionOptionSpecialType.userName,
|
||||
valueType: 0
|
||||
},
|
||||
{
|
||||
@@ -80,7 +81,7 @@ suite('SQL ProviderConnectionInfo tests', () => {
|
||||
defaultValue: undefined,
|
||||
isIdentity: true,
|
||||
isRequired: true,
|
||||
specialValueType: 2,
|
||||
specialValueType: ConnectionOptionSpecialType.authType,
|
||||
valueType: 0
|
||||
},
|
||||
{
|
||||
@@ -92,7 +93,7 @@ suite('SQL ProviderConnectionInfo tests', () => {
|
||||
defaultValue: undefined,
|
||||
isIdentity: true,
|
||||
isRequired: true,
|
||||
specialValueType: 4,
|
||||
specialValueType: ConnectionOptionSpecialType.password,
|
||||
valueType: 0
|
||||
},
|
||||
{
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
'use strict';
|
||||
import data = require('data');
|
||||
import * as assert from 'assert';
|
||||
import { ServiceOptionType } from 'sql/parts/connection/common/connectionManagement';
|
||||
import { RestoreViewModel } from 'sql/parts/disasterRecovery/restore/restoreViewModel';
|
||||
import { ServiceOptionType } from 'sql/workbench/api/common/sqlExtHostTypes';
|
||||
|
||||
suite('Restore Dialog view model tests', () => {
|
||||
let option1String = 'option1';
|
||||
|
||||
@@ -9,6 +9,7 @@ import { ConnectionManagementInfo } from 'sql/parts/connection/common/connection
|
||||
import { ICapabilitiesService } from 'sql/services/capabilities/capabilitiesService';
|
||||
import Event from 'vs/base/common/event';
|
||||
import { Action } from 'vs/base/common/actions';
|
||||
import { ConnectionOptionSpecialType } from 'sql/workbench/api/common/sqlExtHostTypes';
|
||||
|
||||
|
||||
export class CapabilitiesTestService implements ICapabilitiesService {
|
||||
@@ -33,7 +34,7 @@ export class CapabilitiesTestService implements ICapabilitiesService {
|
||||
defaultValue: undefined,
|
||||
isIdentity: true,
|
||||
isRequired: true,
|
||||
specialValueType: 0,
|
||||
specialValueType: ConnectionOptionSpecialType.serverName,
|
||||
valueType: 0
|
||||
},
|
||||
{
|
||||
@@ -45,7 +46,7 @@ export class CapabilitiesTestService implements ICapabilitiesService {
|
||||
defaultValue: undefined,
|
||||
isIdentity: true,
|
||||
isRequired: true,
|
||||
specialValueType: 1,
|
||||
specialValueType: ConnectionOptionSpecialType.databaseName,
|
||||
valueType: 0
|
||||
},
|
||||
{
|
||||
@@ -57,7 +58,7 @@ export class CapabilitiesTestService implements ICapabilitiesService {
|
||||
defaultValue: undefined,
|
||||
isIdentity: true,
|
||||
isRequired: true,
|
||||
specialValueType: 3,
|
||||
specialValueType: ConnectionOptionSpecialType.userName,
|
||||
valueType: 0
|
||||
},
|
||||
{
|
||||
@@ -69,7 +70,7 @@ export class CapabilitiesTestService implements ICapabilitiesService {
|
||||
defaultValue: undefined,
|
||||
isIdentity: true,
|
||||
isRequired: true,
|
||||
specialValueType: 2,
|
||||
specialValueType: ConnectionOptionSpecialType.authType,
|
||||
valueType: 0
|
||||
},
|
||||
{
|
||||
@@ -81,7 +82,7 @@ export class CapabilitiesTestService implements ICapabilitiesService {
|
||||
defaultValue: undefined,
|
||||
isIdentity: true,
|
||||
isRequired: true,
|
||||
specialValueType: 4,
|
||||
specialValueType: ConnectionOptionSpecialType.password,
|
||||
valueType: 0
|
||||
}
|
||||
]
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import data = require('data');
|
||||
import * as data from 'data';
|
||||
|
||||
export class ConnectionProviderStub implements data.ConnectionProvider {
|
||||
handle: number = 1;
|
||||
public readonly providerId = 'MSSQL';
|
||||
|
||||
connect(connectionUri: string, connectionInfo: data.ConnectionInfo): Thenable<boolean> {
|
||||
return undefined;
|
||||
|
||||
@@ -8,6 +8,8 @@ import data = require('data');
|
||||
|
||||
export class ObjectExplorerProviderTestService implements data.ObjectExplorerProvider {
|
||||
|
||||
public readonly providerId = 'MSSQL';
|
||||
|
||||
public createNewSession(connInfo: data.ConnectionInfo): Thenable<data.ObjectExplorerCloseSessionResponse> {
|
||||
return Promise.resolve(undefined);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user