Fix .NET E2E auth setup#1334
Merged
Merged
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
Cross-SDK Consistency Review ✅This PR only modifies Changes reviewed:
Since these are test harness fixes specific to the .NET project and introduce no new public API methods, parameters, or behavioral changes visible to SDK consumers, no cross-language updates are needed. The changes maintain cross-SDK consistency.
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adjusts the .NET E2E test harness usage to make authentication behavior consistent between the live runtime and the replay-backed test environment, preventing failures caused by ambient/process-level auth resolution.
Changes:
- Added a dedicated “no-auth” E2E client path for the per-session “no token” scenario that clears common ambient token environment variables and disables logged-in-user fallback.
- Updated the “resume without permission handler” E2E test to run under
E2ETestContextso both the TCP server and resume client share the expected harness proxy/auth setup.
Show a summary per file
| File | Description |
|---|---|
| dotnet/test/E2E/PerSessionAuthE2ETests.cs | Introduces a no-auth client configuration and uses it for the no-token per-session auth test to avoid ambient auth affecting results. |
| dotnet/test/E2E/ClientE2ETests.cs | Switches the resume-without-permission-handler test to use E2ETestContext-created clients for consistent proxy/auth environment. |
Copilot's findings
- Files reviewed: 2/2 changed files
- Comments generated: 0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The live runtime can resolve process-level auth differently from the replayed SDK test harness, which caused .NET E2E tests to fail when no per-session token or authenticated resume context was explicitly configured.
Summary
Validation
dotnet test dotnet\test\GitHub.Copilot.SDK.Test.csproj --filter "FullyQualifiedName~PerSessionAuthE2ETests" --no-restore --logger "console;verbosity=minimal"dotnet test dotnet\test\GitHub.Copilot.SDK.Test.csproj --filter "FullyQualifiedName~ClientE2ETests.Should_Allow_ResumeSession_Called_Without_PermissionHandler" --no-restore --logger "console;verbosity=minimal"