mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-12 19:18:32 -05:00
Fix default auth and 'AzureTenantId' to persist and not reset on selection event (#21289)
This commit is contained in:
@@ -164,6 +164,9 @@ describe('AzureResourceDatabaseTreeDataProvider.getChildren', function (): void
|
||||
should(child.treeItem.label).equal(`${database.name} (${database.serverName})`);
|
||||
should(child.treeItem.collapsibleState).equal(vscode.TreeItemCollapsibleState.Collapsed);
|
||||
should(child.treeItem.contextValue).equal(AzureResourceItemType.database);
|
||||
|
||||
// Authentication type should be empty string by default to support setting 'Sql: Default Authentication Type'.
|
||||
should(child.treeItem.payload!.authenticationType).equal('');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -163,6 +163,9 @@ describe('AzureResourceDatabaseServerTreeDataProvider.getChildren', function ():
|
||||
should(child.treeItem.label).equal(databaseServer.name);
|
||||
should(child.treeItem.collapsibleState).equal(vscode.TreeItemCollapsibleState.Collapsed);
|
||||
should(child.treeItem.contextValue).equal(AzureResourceItemType.databaseServer);
|
||||
|
||||
// Authentication type should be empty string by default to support setting 'Sql: Default Authentication Type'.
|
||||
should(child.treeItem.payload!.authenticationType).equal('');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -106,7 +106,7 @@ describe('AzureResourceService.getRootChildren', function (): void {
|
||||
});
|
||||
|
||||
it('Should be correct when provider id is correct.', async function (): Promise<void> {
|
||||
const children = await resourceService.getRootChildren(mockResourceProvider1.object.providerId, mockAccount, mockSubscription, mockTenantId);
|
||||
const children = await resourceService.getRootChildren(mockResourceProvider1.object.providerId, mockAccount, mockSubscription);
|
||||
|
||||
should(children).Array();
|
||||
});
|
||||
@@ -114,7 +114,7 @@ describe('AzureResourceService.getRootChildren', function (): void {
|
||||
it('Should throw exceptions when provider id is incorrect.', async function (): Promise<void> {
|
||||
const providerId = 'non_existent_provider_id';
|
||||
try {
|
||||
await resourceService.getRootChildren(providerId, mockAccount, mockSubscription, mockTenantId);
|
||||
await resourceService.getRootChildren(providerId, mockAccount, mockSubscription);
|
||||
} catch (error) {
|
||||
should(error.message).equal(`Azure resource provider doesn't exist. Id: ${providerId}`);
|
||||
return;
|
||||
@@ -147,7 +147,7 @@ describe('AzureResourceService.getChildren', function (): void {
|
||||
it('Should throw exceptions when provider id is incorrect.', async function (): Promise<void> {
|
||||
const providerId = 'non_existent_provider_id';
|
||||
try {
|
||||
await resourceService.getRootChildren(providerId, mockAccount, mockSubscription, mockTenantId);
|
||||
await resourceService.getRootChildren(providerId, mockAccount, mockSubscription);
|
||||
} catch (error) {
|
||||
should(error.message).equal(`Azure resource provider doesn't exist. Id: ${providerId}`);
|
||||
return;
|
||||
@@ -180,7 +180,7 @@ describe('AzureResourceService.getTreeItem', function (): void {
|
||||
it('Should throw exceptions when provider id is incorrect.', async function (): Promise<void> {
|
||||
const providerId = 'non_existent_provider_id';
|
||||
try {
|
||||
await resourceService.getRootChildren(providerId, mockAccount, mockSubscription, mockTenantId);
|
||||
await resourceService.getRootChildren(providerId, mockAccount, mockSubscription);
|
||||
} catch (error) {
|
||||
should(error.message).equal(`Azure resource provider doesn't exist. Id: ${providerId}`);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user