mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Move protocol client out (#643)
* close * connection is working * formatting * adds all * formatting * formatting and changing how features are initialized * formatting * changed named of typings file * update * updated to use dataprotocol npm * formatting * removed unneeded logging * readd npm shrinkwrap * still not working * removed unnecessary codfe * addressed comments * readded azure resource provider * fix capabilities cacheing * added backwards capat for older protocol * update shrinkwrap * update shrinkwrap * updated shrinkwrap * fixed tests * removed dead code * remove dead code * fix compile * remove backcompat stuff * change location of npm * vbump sqltools * merge master * fix imports * fix build breaks * update for sqlops * update yarn dependencies
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
'use strict';
|
||||
|
||||
import * as assert from 'assert';
|
||||
import * as data from 'data';
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as TypeMoq from 'typemoq';
|
||||
import { AccountProviderStub, AccountManagementTestService } from 'sqltest/stubs/accountManagementStubs';
|
||||
import { ExtHostAccountManagement } from 'sql/workbench/api/node/extHostAccountManagement';
|
||||
@@ -22,8 +22,8 @@ const IThreadService = createDecorator<IThreadService>('threadService');
|
||||
|
||||
// SUITE STATE /////////////////////////////////////////////////////////////
|
||||
let instantiationService: TestInstantiationService;
|
||||
let mockAccountMetadata: data.AccountProviderMetadata;
|
||||
let mockAccount: data.Account;
|
||||
let mockAccountMetadata: sqlops.AccountProviderMetadata;
|
||||
let mockAccount: sqlops.Account;
|
||||
let threadService: TestThreadService;
|
||||
|
||||
// TESTS ///////////////////////////////////////////////////////////////////
|
||||
@@ -258,8 +258,8 @@ suite('ExtHostAccountManagement', () => {
|
||||
});
|
||||
});
|
||||
|
||||
function getMockAccountProvider(): TypeMoq.Mock<data.AccountProvider> {
|
||||
let mock = TypeMoq.Mock.ofType<data.AccountProvider>(AccountProviderStub);
|
||||
function getMockAccountProvider(): TypeMoq.Mock<sqlops.AccountProvider> {
|
||||
let mock = TypeMoq.Mock.ofType<sqlops.AccountProvider>(AccountProviderStub);
|
||||
mock.setup((obj) => obj.clear(TypeMoq.It.isValue(mockAccount.key)))
|
||||
.returns(() => Promise.resolve(undefined));
|
||||
mock.setup((obj) => obj.refresh(TypeMoq.It.isValue(mockAccount)))
|
||||
|
||||
@@ -6,15 +6,15 @@
|
||||
'use strict';
|
||||
|
||||
import * as assert from 'assert';
|
||||
import {TestThreadService} from 'vs/workbench/test/electron-browser/api/testThreadService';
|
||||
import {TestInstantiationService} from 'vs/platform/instantiation/test/common/instantiationServiceMock';
|
||||
import {ExtHostCredentialManagement} from 'sql/workbench/api/node/extHostCredentialManagement';
|
||||
import {SqlMainContext} from 'sql/workbench/api/node/sqlExtHost.protocol';
|
||||
import {IThreadService} from 'vs/workbench/services/thread/common/threadService';
|
||||
import {MainThreadCredentialManagement} from 'sql/workbench/api/node/mainThreadCredentialManagement';
|
||||
import {CredentialsTestProvider, CredentialsTestService} from 'sqltest/stubs/credentialsTestStubs';
|
||||
import {ICredentialsService} from 'sql/services/credentials/credentialsService';
|
||||
import {Credential, CredentialProvider} from 'data';
|
||||
import { TestThreadService } from 'vs/workbench/test/electron-browser/api/testThreadService';
|
||||
import { TestInstantiationService } from 'vs/platform/instantiation/test/common/instantiationServiceMock';
|
||||
import { ExtHostCredentialManagement } from 'sql/workbench/api/node/extHostCredentialManagement';
|
||||
import { SqlMainContext } from 'sql/workbench/api/node/sqlExtHost.protocol';
|
||||
import { IThreadService } from 'vs/workbench/services/thread/common/threadService';
|
||||
import { MainThreadCredentialManagement } from 'sql/workbench/api/node/mainThreadCredentialManagement';
|
||||
import { CredentialsTestProvider, CredentialsTestService } from 'sqltest/stubs/credentialsTestStubs';
|
||||
import { ICredentialsService } from 'sql/services/credentials/credentialsService';
|
||||
import { Credential, CredentialProvider } from 'sqlops';
|
||||
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
||||
|
||||
const IThreadService = createDecorator<IThreadService>('threadService');
|
||||
@@ -116,18 +116,18 @@ suite('ExtHostCredentialManagement', () => {
|
||||
// Then: I should get an error
|
||||
extHost.$getCredentialProvider(undefined)
|
||||
.then(
|
||||
() => { done('Provider was returned from undefined'); },
|
||||
() => { /* Swallow error, this is success path */ }
|
||||
() => { done('Provider was returned from undefined'); },
|
||||
() => { /* Swallow error, this is success path */ }
|
||||
)
|
||||
.then(() => { return extHost.$getCredentialProvider(null); })
|
||||
.then(
|
||||
() => { done('Provider was returned from null'); },
|
||||
() => { /* Swallow error, this is success path */ }
|
||||
() => { done('Provider was returned from null'); },
|
||||
() => { /* Swallow error, this is success path */ }
|
||||
)
|
||||
.then(() => {return extHost.$getCredentialProvider(''); })
|
||||
.then(() => { return extHost.$getCredentialProvider(''); })
|
||||
.then(
|
||||
() => { done('Provider was returned from \'\''); },
|
||||
() => { done(); }
|
||||
() => { done('Provider was returned from \'\''); },
|
||||
() => { done(); }
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -27,7 +27,7 @@ import { ExtHostDiagnostics } from 'vs/workbench/api/node/extHostDiagnostics';
|
||||
import { ExtHostHeapService } from 'vs/workbench/api/node/extHostHeapService';
|
||||
import * as vscode from 'vscode';
|
||||
|
||||
import * as data from 'data';
|
||||
import * as sqlops from 'sqlops';
|
||||
import { ExtHostDataProtocol } from 'sql/workbench/api/node/extHostDataProtocol';
|
||||
import { SqlExtHostContext } from 'sql/workbench/api/node/sqlExtHost.protocol';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user