mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-21 01:25:37 -05:00
This commit is contained in:
@@ -250,16 +250,13 @@ suite('SQL ConnectionStatusManager tests', () => {
|
||||
newConnection.id = 'test_id';
|
||||
newConnection.serverName = 'new_server_name';
|
||||
newConnection.options['databaseDisplayName'] = newConnection.databaseName;
|
||||
//Duplicate should not be registered if uri is of connection/dashboard type (required for functionality)
|
||||
connections.addConnection(newConnection, 'connection:test_uri_1');
|
||||
connections.addConnection(newConnection, 'dashboard:test_uri_1');
|
||||
//Editor type URIs should generate a new profile id (needed to properly update the connection string)
|
||||
connections.addConnection(newConnection, 'untitled:TestQuery1')
|
||||
connections.addConnection(newConnection, 'test_uri_1');
|
||||
connections.addConnection(newConnection, 'test_uri_2');
|
||||
newConnection = new ConnectionProfile(capabilitiesService, newConnection);
|
||||
|
||||
// Get the connections and verify that the non editor duplicate is only returned once
|
||||
// Get the connections and verify that the duplicate is only returned once
|
||||
let activeConnections = connections.getActiveConnectionProfiles();
|
||||
assert.strictEqual(activeConnections.length, 5);
|
||||
assert.strictEqual(activeConnections.filter(connection => connection.matches(newConnection)).length, 2, 'Did not find newConnection in active connections');
|
||||
assert.strictEqual(activeConnections.length, 4);
|
||||
assert.strictEqual(activeConnections.filter(connection => connection.matches(newConnection)).length, 1, 'Did not find newConnection in active connections');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user