Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to auth v4 #980

Merged
merged 2 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading