Skip to content

Commit

Permalink
Upgrade to auth v4 (#980)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexweininger authored Dec 6, 2024
1 parent f264fd8 commit 68075be
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 12 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,7 @@
"@azure/arm-resources": "^5.2.0",
"@azure/arm-resources-profile-2020-09-01-hybrid": "^2.1.0",
"@azure/ms-rest-js": "^2.7.0",
"@microsoft/vscode-azext-azureauth": "^3.1.0",
"@microsoft/vscode-azext-azureauth": "^4.0.0",
"@microsoft/vscode-azext-azureutils": "^3.1.1",
"@microsoft/vscode-azext-utils": "^2.5.12",
"buffer": "^6.0.3",
Expand Down
3 changes: 2 additions & 1 deletion src/services/VSCodeAzureSubscriptionProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import { VSCodeAzureSubscriptionProvider } from '@microsoft/vscode-azext-azureauth';
import { getSelectedTenantAndSubscriptionIds } from '../commands/accounts/selectSubscriptions';
import { ext } from '../extensionVariables';

let vscodeAzureSubscriptionProvider: VSCodeAzureSubscriptionProvider | undefined;

Expand All @@ -19,5 +20,5 @@ async function createVSCodeAzureSubscriptionProvider(): Promise<VSCodeAzureSubsc
// This will update the selected subscription IDs to ensure the filters are in the form of `${tenantId}/${subscriptionId}`
await getSelectedTenantAndSubscriptionIds();

return new VSCodeAzureSubscriptionProvider();
return new VSCodeAzureSubscriptionProvider(ext.outputChannel);
}
9 changes: 6 additions & 3 deletions test/api/MockAzureSubscriptionProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import type { TenantIdDescription } from '@azure/arm-resources-subscriptions';
import type { AzureSubscription, AzureSubscriptionProvider } from '@microsoft/vscode-azext-azureauth';
import type { AzureSubscription, AzureSubscriptionProvider, AzureTenant } from '@microsoft/vscode-azext-azureauth';
import { Disposable, Event } from 'vscode';
import { MockResources } from './mockServiceFactory';

Expand Down Expand Up @@ -45,9 +44,13 @@ export class MockAzureSubscriptionProvider implements AzureSubscriptionProvider
throw new Error('Method not implemented.');
}

public async getTenants(): Promise<TenantIdDescription[]> {
public async getTenants(): Promise<AzureTenant[]> {
return [{
tenantId: 'tenantId',
account: {
id: 'accountId',
label: 'accountLabel',
}
}];
}

Expand Down

0 comments on commit 68075be

Please sign in to comment.