mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-23 17:23:02 -05:00
Fix Edit Connection behavior that affects multiple areas working with edited connection (#20907)
This commit is contained in:
@@ -93,8 +93,6 @@ export class ConnectionConfig {
|
||||
});
|
||||
if (sameProfileInList) {
|
||||
let profileIndex = profiles.findIndex(value => value === sameProfileInList);
|
||||
newProfile.id = sameProfileInList.id;
|
||||
connectionProfile.id = sameProfileInList.id;
|
||||
profiles[profileIndex] = newProfile;
|
||||
} else {
|
||||
profiles.push(newProfile);
|
||||
|
||||
@@ -325,9 +325,8 @@ suite('ConnectionConfig', () => {
|
||||
connectionProfile.options['databaseDisplayName'] = existingConnection.options['databaseName'];
|
||||
|
||||
let config = new ConnectionConfig(configurationService, capabilitiesService.object);
|
||||
let savedConnectionProfile = await config.addConnection(connectionProfile);
|
||||
await config.addConnection(connectionProfile);
|
||||
|
||||
assert.strictEqual(savedConnectionProfile.id, existingConnection.id);
|
||||
assert.strictEqual(configurationService.inspect<IConnectionProfileStore[]>('datasource.connections').userValue!.length, testConnections.length);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user