mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-02 01:25:39 -05:00
Additional tests for connection (#10944)
* Added providerRegistered test * test for EditConnectionDialog * changed wording * added test for connectionInfo * utils.ts tests added * hasRegisteredServers test * commented out editconnection tests, addl. tests * added onConnectionChangedNotification test * added changeGroupId tests * Added connection profile changes * added connectIfNotConnected test * added delete connection test * isRecent and disconnect editor tests * added registerIconProvider test * Fix for ensureDefaultLanguageFlavor test * added a few tests * utils prefix test updated * added utils tests
This commit is contained in:
@@ -8,6 +8,7 @@ import * as azdata from 'azdata';
|
||||
import { ConnectionProfile } from 'sql/platform/connection/common/connectionProfile';
|
||||
import { IConnectionProfileGroup } from 'sql/platform/connection/common/connectionProfileGroup';
|
||||
import { ConnectionStore } from 'sql/platform/connection/common/connectionStore';
|
||||
import { fixupConnectionCredentials } from 'sql/platform/connection/common/connectionInfo';
|
||||
import { IConnectionProfile, ConnectionOptionSpecialType, ServiceOptionType } from 'sql/platform/connection/common/interfaces';
|
||||
import { TestConfigurationService } from 'sql/platform/connection/test/common/testConfigurationService';
|
||||
import { TestCredentialsService } from 'sql/platform/credentials/test/common/testCredentialsService';
|
||||
@@ -251,6 +252,15 @@ suite('ConnectionStore', () => {
|
||||
assert.equal(credentialsService.credentials.size, 1);
|
||||
});
|
||||
|
||||
test('fixupConnectionCredentials should fix blank connection profile', () => {
|
||||
let blankConnectionProfile = new ConnectionProfile(capabilitiesService, '');
|
||||
let resultProfile = fixupConnectionCredentials(blankConnectionProfile);
|
||||
assert.equal(resultProfile.serverName, '');
|
||||
assert.equal(resultProfile.databaseName, '');
|
||||
assert.equal(resultProfile.userName, '');
|
||||
assert.equal(resultProfile.password, '');
|
||||
});
|
||||
|
||||
test('can clear connections list', async () => {
|
||||
const storageService = new InMemoryStorageService();
|
||||
const configurationService = new TestConfigurationService();
|
||||
|
||||
Reference in New Issue
Block a user