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

[Android] Fix some System.Net tests #71385

Merged

Conversation

simonrozsival
Copy link
Member

@simonrozsival simonrozsival commented Jun 28, 2022

We use some self-signed certificates in our tests and Android doesn't allow traffic to the servers using those certificates. In order to get the tests to work, we need to configure include the public keys in the .apk we build and use Network Security Configuration to trust our self-signed certificates.

Closes #37087
Fixes most of #68206
Closes #69870
Fixes Android-related failures in #72209

@ghost
Copy link

ghost commented Jun 28, 2022

Tagging subscribers to this area: @dotnet/ncl, @vcsjones
See info in area-owners.md if you want to be subscribed.

Issue Details

This PR fixes most of the tests that were disabled in #68206.

We use some self-signed certificates in our tests and Android doesn't allow traffic to the servers using those certificates. In order to get the tests to work, we need to configure include the public keys in the .apk we build and use Network Security Configuration to trust our self-signed certificates.

Author: simonrozsival
Assignees: -
Labels:

area-System.Net.Security

Milestone: -

@simonrozsival
Copy link
Member Author

/azp run runtime-extra-platforms

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@simonrozsival
Copy link
Member Author

The tests pass on Android devices (arm and arm64 lanes) and fail on emulators (x86 and x64 lanes). I'm converting this PR to a draft until I figure out why.

@simonrozsival simonrozsival marked this pull request as draft June 29, 2022 13:22
@simonrozsival
Copy link
Member Author

/azp run runtime-extra-platforms

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@simonrozsival
Copy link
Member Author

/azp run runtime-extra-platforms

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@simonrozsival simonrozsival changed the title [Android] Fix some System.Net.Security tests [Android] Fix some System.Nettests Jul 4, 2022
@simonrozsival simonrozsival changed the title [Android] Fix some System.Nettests [Android] Fix some System.Net tests Jul 4, 2022
@simonrozsival
Copy link
Member Author

/azp run runtime-extra-platforms

1 similar comment
@simonrozsival
Copy link
Member Author

/azp run runtime-extra-platforms

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@simonrozsival
Copy link
Member Author

/azp run runtime-extra-platforms

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@simonrozsival
Copy link
Member Author

/azp run runtime-extra-platforms

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@simonrozsival
Copy link
Member Author

All of the failing tests are know issues and are also happening on main. This PR is now ready to be merged.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Android] Some System.Net.Http.Functional.Tests failing System.Net.Requests.Tests tests fail on Android
3 participants