Repository navigation
[release/10.0.1xx] [tests] Use local servers for networking tests - #13401
Open
jonathanpeppers wants to merge 1 commit into
Open
jonathanpeppers wants to merge 1 commit into
jonathanpeppers wants to merge 1 commit into
Conversation
Backport to release/10.0.1xx, retaining AndroidClientHandler and its shared test base in AndroidClientHandlerTests.cs. Keep the release-specific project entries and netstandard2.0 LinkDesc test library configuration. Replace httpbin.org redirect/decompression coverage and badssl.com certificate cases with local loopback servers. Preserve the two TLS validation callbacks during redirects and use the local POST endpoint for the LinkDesc HttpClient regression. (cherry picked from commit bef2665) Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The Android TLS, hostname-validation, and SslStream changes require .NET 10 Android device validation, which host-side .NET 11 checks do not establish.
No open issues 🎉
What changed in this PR
Backports local networking test servers to release/10.0.1xx, reducing external-service dependencies while preserving .NET 10 handler coverage.
Changes:
- Replace external redirect, decompression, and invalid-certificate endpoints with loopback HTTP/HTTPS servers.
- Adapt the LinkDesc regression to a local POST endpoint, with C# 8 and loopback cleartext configuration.
- Preserve inherited
AndroidClientHandlerredirect tests and the assertion that HTTPS redirects trigger two certificate-validation callbacks.
Reported compilation and host-side checks passed; full Android build and device execution remain unverified.
| File | Description |
|---|---|
tests/MSBuildDeviceIntegration/Tests/InstallAndRunTests.cs |
Include the server helper, enable C# 8, and configure loopback cleartext access. |
tests/MSBuildDeviceIntegration/Resources/LinkDescTest/HttpClientTest.cs |
Post to the local server and dispose request resources. |
tests/Mono.Android-Tests/Mono.Android-Tests/Xamarin.Android.Net/LocalTestServers.cs |
Add loopback servers for redirects, compression, POST handling, and TLS certificates. |
tests/Mono.Android-Tests/Mono.Android-Tests/Xamarin.Android.Net/AndroidMessageHandlerTests.cs |
Move decompression, certificate, and redirect tests to local endpoints. |
tests/Mono.Android-Tests/Mono.Android-Tests/Xamarin.Android.Net/AndroidClientHandlerTests.cs |
Use local endpoints for inherited GET and POST redirect coverage. |
tests/Mono.Android-Tests/Mono.Android-Tests/System.Net/SslTest.cs |
Remove httpbin from the external HTTPS smoke-test URLs. |
tests/Mono.Android-Tests/Mono.Android-Tests/Mono.Android.NET-Tests.csproj |
Compile the new local-server helper. |
Review effort: Balanced
Member
Author
|
/azp run |
|
Azure Pipelines: 1 pipeline(s) were filtered out due to trigger conditions. |
This branch has not been deployed
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.
Summary
Manual backport of #12022 (bef2665) to
release/10.0.1xxafter the automatic backport failed.AndroidClientHandlerfixture and inherited redirect coverage inAndroidClientHandlerTests.cs.netstandard2.0LinkDesc regression library.This branch contains exactly one commit on top of
release/10.0.1xx.Validation
Microsoft.Android.Ref.3636.1.118).netstandard2.0with C# 8.