mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-03 17:23:42 -05:00
This reverts commit 22a427f934.
This commit is contained in:
@@ -32,7 +32,6 @@ import { TestStorageService, TestEnvironmentService, TestEditorService } from 'v
|
||||
import { TestNotificationService } from 'vs/platform/notification/test/common/testNotificationService';
|
||||
import { TestConfigurationService } from 'vs/platform/configuration/test/common/testConfigurationService';
|
||||
import { NullLogService } from 'vs/platform/log/common/log';
|
||||
import { assign } from 'vs/base/common/objects';
|
||||
|
||||
suite('SQL ConnectionManagementService tests', () => {
|
||||
|
||||
@@ -66,9 +65,9 @@ suite('SQL ConnectionManagementService tests', () => {
|
||||
id: undefined
|
||||
};
|
||||
let connectionProfileWithEmptySavedPassword: IConnectionProfile =
|
||||
assign({}, connectionProfile, { password: '', serverName: connectionProfile.serverName + 1 });
|
||||
Object.assign({}, connectionProfile, { password: '', serverName: connectionProfile.serverName + 1 });
|
||||
let connectionProfileWithEmptyUnsavedPassword: IConnectionProfile =
|
||||
assign({}, connectionProfile, { password: '', serverName: connectionProfile.serverName + 2, savePassword: false });
|
||||
Object.assign({}, connectionProfile, { password: '', serverName: connectionProfile.serverName + 2, savePassword: false });
|
||||
|
||||
let connectionManagementService: ConnectionManagementService;
|
||||
let configResult: { [key: string]: any } = {};
|
||||
@@ -759,9 +758,9 @@ suite('SQL ConnectionManagementService tests', () => {
|
||||
let dbName = 'master';
|
||||
let serverName = 'test_server';
|
||||
let userName = 'test_user';
|
||||
let connectionProfileWithoutDb: IConnectionProfile = assign(connectionProfile,
|
||||
let connectionProfileWithoutDb: IConnectionProfile = Object.assign(connectionProfile,
|
||||
{ serverName: serverName, databaseName: '', userName: userName, getOptionsKey: () => undefined });
|
||||
let connectionProfileWithDb: IConnectionProfile = assign(connectionProfileWithoutDb, { databaseName: dbName });
|
||||
let connectionProfileWithDb: IConnectionProfile = Object.assign(connectionProfileWithoutDb, { databaseName: dbName });
|
||||
// Save the database with a URI that has the database name filled in, to mirror Carbon's behavior
|
||||
let ownerUri = Utils.generateUri(connectionProfileWithDb);
|
||||
connect(ownerUri, undefined, false, connectionProfileWithoutDb).then(() => {
|
||||
@@ -807,7 +806,7 @@ suite('SQL ConnectionManagementService tests', () => {
|
||||
});
|
||||
|
||||
test('getActiveConnectionCredentials returns the credentials dictionary for a connection profile', () => {
|
||||
let profile = assign({}, connectionProfile);
|
||||
let profile = Object.assign({}, connectionProfile);
|
||||
profile.options = { password: profile.password };
|
||||
profile.id = 'test_id';
|
||||
connectionStatusManager.addConnection(profile, 'test_uri');
|
||||
@@ -817,7 +816,7 @@ suite('SQL ConnectionManagementService tests', () => {
|
||||
});
|
||||
|
||||
test('getConnectionUriFromId returns a URI of an active connection with the given id', () => {
|
||||
let profile = assign({}, connectionProfile);
|
||||
let profile = Object.assign({}, connectionProfile);
|
||||
profile.options = { password: profile.password };
|
||||
profile.id = 'test_id';
|
||||
let uri = 'test_initial_uri';
|
||||
@@ -832,7 +831,7 @@ suite('SQL ConnectionManagementService tests', () => {
|
||||
});
|
||||
|
||||
test('getConectionUriFromId returns undefined if the given connection is not active', () => {
|
||||
let profile = assign({}, connectionProfile);
|
||||
let profile = Object.assign({}, connectionProfile);
|
||||
profile.options = { password: profile.password };
|
||||
profile.id = 'test_id';
|
||||
connectionStatusManager.addConnection(profile, Utils.generateUri(profile));
|
||||
|
||||
Reference in New Issue
Block a user