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

Fix client token credentials issue before Az.Account module is imported. #27248

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vidai-msft
Copy link
Contributor

@vidai-msft vidai-msft commented Feb 28, 2025

Description

This PR fixes the exception when pre-initialization was executed while Az.Accounts was not loaded.
The solution was to register necessary component during TestFx initialization.

The PR also refactors the code in WithManagementClients method to remove unnecessary function calls.

Mandatory Checklist

  • SHOULD update ChangeLog.md file(s) appropriately
    • For SDK-based development mode, update src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.
      • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header in the past tense.
    • For autorest-based development mode, include the changelog in the PR description.
    • Should not change ChangeLog.md if no new release is required, such as fixing test case only.
  • SHOULD regenerate markdown help files if there is cmdlet API change. Instruction
  • SHOULD have proper test coverage for changes in pull request.
  • SHOULD NOT adjust version of module manually in pull request

Copy link

Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status.

@vidai-msft vidai-msft force-pushed the testfx-recording-issue branch from 6e99518 to 32c6f96 Compare February 28, 2025 09:39
@vidai-msft vidai-msft force-pushed the testfx-recording-issue branch from 32c6f96 to 77dc43f Compare February 28, 2025 10:07
@notyashhh
Copy link
Member

@vidai-msft Looks Great!!

I couldn't find anything wrong in the code changes. We don't need a changelog update since this does not require a release.
Are there any docs/readmes' that we have to update?

If not, we can get it merged :))

@vidai-msft
Copy link
Contributor Author

@vidai-msft Looks Great!!

I couldn't find anything wrong in the code changes. We don't need a changelog update since this does not require a release. Are there any docs/readmes' that we have to update?

If not, we can get it merged :))

@notyashhh No docs need update.

@notyashhh notyashhh self-requested a review March 3, 2025 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants