Conversation
There was a problem hiding this comment.
Pull request overview
This PR adjusts the nightly CRUD test setup, likely to avoid undoing the Azure DevOps federated-credentials subscription provider override used in long-running/nightly runs.
Changes:
- Removed a call that cleared the test override for the Azure subscription provider in nightly CRUD tests.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const testApi = getCachedTestApi(); | ||
| testApi.testing.setOverrideAzureServiceFactory(undefined); | ||
| testApi.testing.setOverrideAzureSubscriptionProvider(undefined); | ||
|
|
||
| const subscriptionTreeItems = await testApi.compatibility.getAppResourceTree().getChildren() as unknown as SubscriptionItem[]; |
There was a problem hiding this comment.
PR description says "don't merge WIP", but the PR is opened as a regular change. If this is intended to be non-mergeable, mark the PR as Draft; otherwise please update the description to reflect merge intent so it isn't accidentally blocked later.
| @@ -25,7 +25,6 @@ suite('Resource CRUD Operations', function (this: Mocha.Suite): void { | |||
|
|
|||
| const testApi = getCachedTestApi(); | |||
| testApi.testing.setOverrideAzureServiceFactory(undefined); | |||
There was a problem hiding this comment.
Removing the call to clear setOverrideAzureSubscriptionProvider(undefined) can let a mock subscription provider leak in from earlier unit tests (e.g. createMockSubscriptionWithFunctions() sets an override and nothing appears to reset it). When long-running tests run without AzCode_UseAzureFederatedCredentials, this suite can end up using the mock provider, causing azureResourceGroups.logIn/tree subscription selection and subsequent ARM calls to break. Consider reintroducing the reset when federated creds are disabled (or, better, clear overrides in test/nightly/global.nightly.test.ts and then conditionally set the AzDO provider).
| testApi.testing.setOverrideAzureServiceFactory(undefined); | |
| testApi.testing.setOverrideAzureServiceFactory(undefined); | |
| testApi.testing.setOverrideAzureSubscriptionProvider(undefined); |
don't merge WIP