Skip to content

[DO NOT MERGE] Test Live Tests#1916

Draft
g2vinay wants to merge 22 commits intomicrosoft:mainfrom
g2vinay:test-live-tests
Draft

[DO NOT MERGE] Test Live Tests#1916
g2vinay wants to merge 22 commits intomicrosoft:mainfrom
g2vinay:test-live-tests

Conversation

@g2vinay
Copy link
Contributor

@g2vinay g2vinay commented Mar 3, 2026

No description provided.

- CustomChainedCredential: add forceBrowserFallback param, suppressed when
  AZURE_TOKEN_CREDENTIALS=prod; enables InteractiveBrowserCredential fallback
  only in user-identity modes (SingleIdentityTokenCredentialProvider)
- SafeTokenCredential: add normalizeScopes=true for all 8 non-MSAL credentials
  (EnvironmentCredential, WorkloadIdentity, ManagedIdentity, VisualStudio,
  VisualStudioCode, AzureCli, AzurePowerShell, AzureDeveloperCli)
  Converts https://mcp.ai.azure.com/Foundry.Mcp.Tools to
  https://mcp.ai.azure.com/.default so resource-based credential types
  receive the correct scope format; InteractiveBrowserCredential is unwrapped
  and receives the verbatim MSAL permission scope
- Microsoft.Mcp.slnx and Azure.Mcp.Server.slnx: remove deleted
  Azure.Mcp.Tools.Foundry project references
…changes

- CustomChainedCredentialTests: update reflection-based constructor lookup
  from 2-param to 3-param to match new forceBrowserFallback parameter
  added in commit 9b7c48b

- VisualStudioToolNameTests: remove outer TestContext.Current.CancellationToken
  from the linked CTS for I/O operations; add independent 2-minute timeout
  and Fact(Timeout=180000). In --mode all the server eagerly connects to all
  external MCP registry servers (incl. mcp.ai.azure.com) before responding
  to initialize, which can take 15-60+ seconds.
…tness

- RegistryDiscoveryStrategyTests.cs: remove trailing whitespace on blank lines
  (WHITESPACE errors at lines 474/475 and 496/497 in CI)

- VisualStudioToolNameTests.cs: add ReadJsonLineAsync helper to skip non-JSON
  lines in stdout (e.g. azd subprocess diagnostics) before deserializing
  JSON-RPC responses, fixing JsonException when a non-JSON line appears first
…s to prevent registry pollution in playback recordings
… (recorded/playback tests)

RecordingRedirectHandler redirects all outgoing HTTP from the server subprocess
through the test proxy. When --mode all is used, RegistryToolLoader tries to
connect to external registry servers (e.g. mcp.ai.azure.com from registry.json).
Those connection attempts hit the test proxy during an active recording/playback
session, producing unrecorded traffic in playback mode or polluting the recording
sequence in record mode.

Guard in RegistryToolLoader.InitializeAsync: if TEST_PROXY_URL is set (injected
by CommandTestsBase.GetEnvironmentVariables only when a TestProxyFixture is
present), skip discovery and mark as initialized with no clients. This fixes
ALL recorded test classes automatically without per-class overrides.

Also removes the redundant InitializeAsync override from FoundryExtensionsCommandTests
that was added as a per-class workaround for the same root cause.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tools-Foundry Azure AI Foundry

Projects

Status: Untriaged

Development

Successfully merging this pull request may close these issues.

1 participant